|
Java Enterprise Edition (J2EE) MiddlewareThis page summarizes how Java Enterprise Edition (J2EE) programs work for enterprise development | Topics this page:
|
|
Versions of J2EE
The J2EE v1.3 Specification [174 pages dated July 1, 2001] is the original version. Official website The J2EE v1.4 Specification [246 pages dated Nov 24, 2003] Official website Since then, AOP (Aspected Oriented Programming) implemented in packages such as AspectJ have made J2EE more agile with open-source Spring and the Hibernate persistence provider. Java Platform, Enterprise Edition (Java EE 5) makes optional XML deployment descriptors (side files for defining components and specifying deployment instructions) with annotations in the code. It also features Enterprise JavaBeans (EJB) Technology 3.0, JavaServer Faces (JSF) Technology for interface design, and the Java Persistence API. |
The J2EE Architect's Handbook: How to be a Successful Technical Architect for J2EE Applications (DVT Press, 2004, 284 pages) by Derek Ashmore |
J2EE Architecture
J2EE is called "middleware" because it sits in the middle between web servers responding to clients at the presentation layer and databases in Enterprise Information Systems (EIS).
Behind the scenes, unnoticed by users of a typical web application, run web services :
Java Server Pages (JSP) has Java (usually presentation logic) code embedded in HTML-like text documents. v1.2 JSPs may contain HTML-like tags from the JSTL (JSP Standard Tag Library) in \WEB-INF\lib. See JSP Standard Tag Library Kick Start (published by Sams) or Making Use of JSP by Madhushree Ganguli (published by Wiley Publishing, Inc.). Java Servlets are Java programs which issue HTML. See Java Servlet Programming Bible by Suresh Rajagopalan (Editor), Ramesh Rajamani, Ramesh Krishnaswamy, and Sridhar Vijendran (published by Wiley Publishing, Inc.). J2EE app servers integrate with other web-based apps using resource adaptor components developed with an Common Client Interface (CCI) Sun introduced with the Java 2 Enterprise Edition (J2EE) 1.3 specification J2EE Connector Architecture (JCA) common interface of scalable, secure, and transactional integrity mechanisms just like JDBC provides for databases. iWay
|
J2EE Software VendorsThe major J2EE vendors are:
To avoid the complexity of deploying Web services in a Java environment, some projects have stuck with individual API's like JAX-RPC or frameworks such as Apache Axis for plain old Java objects (POJO's) with no inheritance dependencies. |
Download 60 Day Demo versions of Websphere
|
Java BeansThe JavaBeans standard is a low-level component model tailored to the Java language. Java beans are reusable platform-neutral software components that can be visually manipulated with a software development tool. Bean interface components include: methods, properties, and events.
"Coarse-grained" methods which communicate several items of information at a time
are more efficient than
Beans communicate state changes to their properties. So other interested Beans can listen to the changes fired and behave appropriately. Listening Beans with an identical property can match the change, such as a change to the color of one component causing a whole group of components to change as well. Bounding changes among beans make it possible for one bean to act as a controller for any component that wants to subscribe to its service. Beans can veto changes sent to them, rejecting values that exceed a defined range for the target Bean (or whatever rule that Bean institutes). Of course, this process only has value to the sending Bean if it can learn whether its target accepts or rejects a change, and then it can respond. The sending Bean may wish to roll back to the previous state if the target Bean cannot comply or, in the case of multiple targets, the sender may attempt to set all target Beans to the last agreed-upon state. |
The J2EE Architect's Handbook by Derek Ashmore at The Server Side.com |
J2EE (Enterprise Endition) Java Beans
Session beans execute a particular business task on behalf of a single client. Session beans are non-persistent. When a client finishes with a session bean, the bean goes away. There are 2 kinds of session beans:
Entity beans are the only dedicated data access components in J2EE and also the most questionable part of J2EE, Their non-J2EE alternatives include Hibernate and JDO. Message beans are not associated with any client since they simply handle messages as they arrive.
Run clientInstead of java.exe, EJB clients are run with a client program which enforces user password authentication.The Sun J2EE Reference Platform provides the runclient.exe program:
WebLogic Server 8.1 supports a true J2EE application thin client in a small footprint (400 KB) standard wlclient.jar and wljmsclient.jar for JMS. These are provided in the /server/lib subdirectory of the weblogic81 installation directory. In previous versions of WebLogic Server, a Java client required the full WebLogic Server JAR on the client machine. This client JAR file also contains a Main-Class entry in its META-INF/MANIFEST.MF file to specify the entry point for the program. Application clients directly access Enterprise JavaBeans running in the business tier, and may, as appropriate communicate through HTTP with servlets running in the Web tier. The client doesn't invoke EJB methods directly, but through a remote interface proxy exposed by EJB remote objects which contain business methods such as “getPubNames()”. RMI/IIOP remoting is an outstanding remoting technology with EJB. There are better alternatives for thread pooling web services remoting because a web container provides thread pooling and there’s no need to duplicate it in the business object tier. |
|
EJB Coding
|
Resource Adaptor Connectors
Sample "cciblackbox" resource adapter for the "CCIEIS" EIS.
import javax.resource.cci.*;
To access the underlying app, JCA Version 1.0 defined CCI portable contracts for JcA Version 1.5 added system-level contracts: |
J2EE Tools & Resources
Open source efforts include:
|
Commercial vendors
|
Related:
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page
Thank you! |