Enterprise Java Overview Panos Konstantinidis Java Developer JUG Leader & Java Champion

Slides:



Advertisements
Similar presentations
J0 1 Marco Ronchetti - Basi di Dati Web e Distribuite – Laurea Specialistica in Informatica – Università di Trento.
Advertisements

11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Apache Struts Technology
Spring, Hibernate and Web Services 13 th September 2014.
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
An architecture for webb applications, J2EE
Introduction to Java 2 Enterprise Edition About myself –Neutrinos, Cancer Research, IT Applications Today’s topic: J2EE –Context –Advantages –Components.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Enterprise Applications & Java/J2EE Technologies Dr. Douglas C. Schmidt Professor of EECS.
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
JMS Java Message Service Instructor Professor: Charles Tappert By Student: Amr Fouda.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Introduction to EJB INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
© 2004 IBM Corporation BEA WebLogic Server Introduction and Training.
Session-01. What is a Servlet? Servlet can be described in many ways, depending on the context: 1.Servlet is a technology i.e. used to create web application.
Understanding and Managing WebSphere V5
Distributed System Using Java 2 Enterprise Edition (J2EE)
UNIT-V The MVC architecture and Struts Framework.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
Distributed Multitiered Applications The J2EE platform uses a multitiered distributed application model. Application logic is divided into components 1.
Chapter 4: Core Web Technologies
Enterprise Java Beans CS-422. Application Servers In the late 1980s and though the mid 1990s a number of corporations (Broadvision, Netscape…) marketed.
Ing. Ignacio Roqueta ARTech GeneXus and J2EE.
Enterprise Computing COSC 617 Jeff Schmitt September 7,2006.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
Introduction to J2EE Architecture Portions by Kunal Mehta.
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
J2EE Overview ver 1.0Page 1 © Wipro Technologies Talent Transformation J2EE Overview.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Databases JDBC (Java Database Connectivity) –Thin clients – servlet,JavaServer Pages (JSP) –Thick clients – RMI to remote databases –most recommended way.
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
XML and Web Services (II/2546)
Introduction to Enterprise JavaBeans Topics In Systems Architecture Barry Herbold
Kemal Baykal Rasim Ismayilov
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
1 Distributed System using J2EE. 2 What is J2EE?  J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Alan L. Batongbacal CS 4244 / 01 Nov 2000
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
EJB Enterprise Java Beans JAVA Enterprise Edition
Glink for Java: applet, application and an API for integrating access to Bull, IBM, UNIX and Minitel systems with your Java based e-business applications.
Apache Struts Technology A MVC Framework for Java Web Applications.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED INTERSTAGE BPM ARCHITECTURE BPMS.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
The Holmes Platform and Applications
J2EE Lecture 10: EJB 3.0 Overview
J2EE Platform Overview (Application Architecture)
WEB SERVICES.
Unit – 5 JAVA Web Services
Introduction to J2EE Architecture
Java EE Overview The problem Java Enterprise Edition attempts to solve: maximize the use of Java technologies by providing a suite of Java technology specifications.
Java EE Overview The problem Java Enterprise Edition attempts to solve: maximize the use of Java technologies by providing a suite of Java technology specifications.
Distributed System Using Java 2 Enterprise Edition (J2EE)
Understanding and Designing with EJB
Introduction to Servlets
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Presentation transcript:

Enterprise Java Overview Panos Konstantinidis Java Developer JUG Leader & Java Champion

Java Enterprise Edition  Introduction to JEE  JEE architecture/technologies  JEE Application Servers  SOA – The next step  Spring Framework.

Enterprise Systems  Enterprise Systems  Large scale and complex systems  n number or tiers  Distributed  Thousands of users  Multithreading  Thousands or millions of requests per hour  Support for fail-over  Support for transactions  Support for security

Before JEE  Developer had to do everything  Care about multithreading  Care about transactions  Care about fail-over  Care about security ... on top of that care about the business logic

After JEE  Application Server/Container takes care of application details  Multithreading  Security  Fail-over  etc.  Developer takes care of business logic

JEE Architecture  JEE architecture layers (image taken from

Servlets  Servlets  Java objects that extend the functionality of a web server  Run on the server  Require a servlet container to run in  Platform and server independent  They access all the Java APIs  Having HTML/XML/WML code within a Java class is ugly, error-prone and hard to maintain

JSP  JSP  A simple and easy way to create dynamic web content  HTML/XML/WML/etc with Java code (scriplets) embedded into it  Runs on the server  Platform and server independent  Needs to be pre-compiled into a servlet

Servlets & JSP  They work together  JSP used for presentation  Servlets are used as controllers/implement logic  By separating logic from presentation (design) it is easier to maintain, scale and build web applications

EJB  The cornerstone of a JEE application  Server side components  They enable fast and simplified development of distributed, transactional, secure and portable enterprise applications  They are deployed into a container

EJB (continued)‏  Three types of EJB (Session, Entity, Message driven)‏  The container is responsible for  Loading and initialising  Transactions  Persistence (activation/passivation and db persistence)‏  communication with clients via remote interfaces  JNDI for finding EJB instances

Session Beans  Perform actions on behalf of a particular client  Stateful  Maintains conversational state with the client  Stateless  Does not maintain state between client calls. The container can substitute beans as necessary between method calls.

Entity Beans  Map data to a database row  Provide abstraction layer so when working with an entity the storage mechanism is not specific.  Container Managed  The container persists the data to the db automatically.  Beans Managed  Developer writes code that persists data to the db and container calls these methods

Message Driven Beans  Receive asynchronous notifications from a JMS server  for example send a purchase order to a JMS queue  Client does not interact with them directly but only through message queues

Java Messaging Service  Software that provides service for messaging  Can be stand-alone or consolidated within an application server  JMS Queue  Messages are sent into a queue and read from the queue. One consumer only  JMS Topic  Publish/subscribe mode. Messages are broadcast to all the consumers

JNDI  Java Naming and Directory Interface  It is used to store and retrieve objects by name  Object have to register with a naming service first  Can interact with existing naming services like LDAP

JTA  The Java Transaction API allows application servers to handle transactions  Developer declares the transaction properties  The application server takes care of the rest

Java Mail  The Java Mail API provides classes that model a mail system  Supports many common protocols  IMAP  POP  SMTP  MIME

JAAS  Java Authentication and Autorisation Service  Authenticates users, makes sure users can log into the system and execute Java code  Authorises users, makes sure users have the right permissions to perform the actions required  Authentication modules include  Kerberos  Keystore  Windows NT

JDBC  Java Database Connectivity  Lets developers access database from Java  Also provides access to other form of data such as excel files  There are drivers for all the known databases

J2EE Connectors  Connectors provide a way to connect J2EE applications to heterogenous systems not written in Java (Siebel, SAP, etc)‏  System vendor provides the right connector

Application Servers  Take care of application-related functionality  Provide sophisticated means to handle multithreading/transactions/security/etc  Handle the life-cycle of the installed components  Usually cost thousands of pounds per CPU

Application Servers (continued)‏  All of application servers provide their own services (JMS, JNDI, servlet containers, etc)‏  Some application servers  WebLogic  WebSphere  Oracle  JBoss (free and open source, but you pay for support)‏  Glassfish (same)‏

Deployment  You deploy the application onto the application server in a form of EAR (Enterprise ARchive) file  EAR is nothing more than a zipped file that contains all relevant files needed.  It is expanded on deployment

Console  Application servers usually provide a console where the administrator or developer can manage the application  Deploy/undeploy applications  Define JDBC resource  Define users and roles  etc

Web Services  Services residing somewhere on the web  Web services enable application to application interaction via the web  Built on existing standards (SOAP over HTTP)‏  Web services are focused on messages not APIs (we don't care what created the message)‏

Web Services (continued)‏  Interoperability between disparate systems  You can access a.NET web service from a Java client (the opposite is also true), etc  Enable Service Oriented Architecture (SOA)‏  Traditional approach is based on objects, we discover and use objects  With SOA we discover and use services

Web Services protocol  Simple Object Access Protocol (SOAP)‏  Transmission over existing HTTP protocol  In essence we send HTTP requests with the whole SOAP message in the body of the POST  XML based

WSDL  Web Services Description Language  Describes a web service  Describes methods and parameter types  Describes return types  How to access it (what port it's running on, where it's running on)‏  XML based  Complicated, use tools to generate the WSDL

UDDI  Universal Description, Discovery and Integration  It's a registry of services  Publishes information about a web service (similar to yellow pages)‏  Publishes the access point of a web service

Spring  Aims behind Spring  Enterprise Java should be easier.  Interfaces are better than classes.  JavaBeans better than EJBs.  Testability is important and should be easier.

Spring (continued)‏  Small size (around 6MB).  One core jar file (and a few more dependencies).  Spring manages life-cycle and configuration of application objects.  Dependency Injection  Objects are given their dependencies instead of creating/looking for them.  Spring gives dependencies upon instatiation.

Spring (continued)‏  Application data are configured through an XML configuration file.  Can be complicated and hard to maintain if there are too many beans configured.  Like JEE, developer is only concerned about business logic, Spring takes care of application related functionality.

Spring Modules  Spring contains several modules, each one can be used on its own.  Core and Context modules, the heart of the Spring framework. Provide fundamental functionality.  AOP module.  JDBC module.  ORM Module (hooks for other ORM implementations).  Web Module.

Spring Core Modules  Initialise all the application objects (JavaBeans) by reading the XML configuration file.  Supply enterprise services such as JNDI, multithreading, remote calls etc.  Provide support with integration with other frameworks (FreeMarker, iBatis etc).

Spring & AOP  Aspect – a general feature we want to apply globally to our application (e.g. logging or exception handling).  Aspects are declared through the XML configuration file.  Container executes the aspect after, before or around a method call.  Around can change the method behaviour.

Spring & JDBC  Provides functionality for JDBC.  Database information (url, port etc) is configured via the XML configuration file.  Handles the creation of connections, result sets, statements, pools etc.  Closes the connection and returns it to the pool of available connections.

Spring & Transactions  Declare transactions in the configuration file/class meta data by using annotations.  Can declare roll back behaviour per method or exception type.  You can't do that with EJBs, only programmatically.  No native support for distributed transactions. Only through JTA.  EJBs support distributed transactions by default.

Spring & Persistence  Doesn't support out of the box ORM solutions.  We need to integrate with existing technologies (Hibernate, TopLink etc). Spring provides the right plumbing to do so.  Alternatively use plain JDBC.

Spring & Web applications  Provides its own web framework (Spring MVC).  Typical MVC pattern with a central servlet acting as controller.  Spring supports several web-oriented tasks (multipart file uploading, session handling etc).  Can be integrated with other web frameworks like Struts, Tapestry, JSF.

Spring & Distributed computing  Remote calls to Spring ca be done via  RMI (same as EJBs)‏  JAX/RPC (for Web Services)‏

Spring & Security  Spring Security (formerly Acegi security)‏  Supports declarative security via XML configuration or class meta data annotations for security (EJBs also support declarative security via roles and users).

Spring & Deployment  Platform independent.  A Spring application should run the same on any other machine that supports Spring.  Migration should be easy (just copy & paste the application data & the XML configuration file).  Same with EJBs, although a bit tricky.

Learning more  Enterprise Java -  JEE compatible servers  JEE tutorial -  JDBC tutorial -  JNDI -  Servlets tutorial - fcs/doc/Servlets.htmlhttp://java.sun.com/j2ee/tutorial/1_3- fcs/doc/Servlets.html  JMS -  Spring Framework -  Spring projects -  WebLogic Server -  WebSphere server -  JBoss Server -  Glassfish Server -

Questions?