The Sun Enterprise JavaBeans specification (http://java.sun.com/products/ejb/docs.html) defines an architecture and interfaces for developing and deploying distributed Java server applications based on a multi-tier architecture.
The intent of this specification is to facilitate and normalize the development, deployment, and assembly of application components (called enterprise beans); such components will be deployable on EJB platforms. The resulting applications are typically transactional, database-oriented, multi-user, secured, scalable, and portable. More precisely, this EJB specification addresses the following areas:
The runtime environment, called the EJB server, which provides the execution environment together with the transactional service, the distribution mechanisms, the persistence management, and the security.
A programmer and user guide explaining how an enterprise bean should be developed, deployed, and used.
Not only will an enterprise bean be independent of the platform and operating system (since it is written in Java), but also of the EJB platform.
The Java2 Enterprise Edition (J2EE) platform is an n-tier platform. Each tier has a specific role:
Clients. Clients are the end-users of the system and can access the J2EE server by several means. One of the most common is to use a Web browser such as Mozilla to connect to a Web server where Java Servlets or Java Server Pages (JSP) access the business logic of the J2EE server (see Figure 1-1). Another solution is to use a specific Java program that directly communicates with the J2EE server (see Figure 1-2).
Web server. The Web server is responsible for accepting client requests and sending HTML replies back to the client. HTML pages can be static files that reside on the Web server filesystem or dynamically built with Servlets or JSPs from data generated by the beans.
Servlet/JSP server. The Java Server Page (JSP) server or Servlet container can be integrated into the Web server or be a separate entity communicating with the Web server. JSP or servlets run within a Java Virtual Machine that can be the same as the one used by the J2EE server.
J2EE application server. The J2EE application server is the place where the beans are executed. JOnAS is fully implemented in Java and all the beans loaded in an instance of JOnAS run within the same Java Virtual Machine. It is possible to run several different JOnAS J2EE application servers on the same or separate machines.
Database server. The database server is used to store and retrieve data. It is accessed through the standard JDBC (Java DataBase Connectivity) API by the beans.
The distributed environment in the EJB world uses RMI, but JOnAS supports several distributed processing environments:
RMI using the Sun proprietary protocol JRMP
Jeremie: the RMI personality of an Object Request Broker called Jonathan, which also provides a CORBA (Common Object Request Broker Architecture) personality. Jeremie allows JOnAS to benefit from the optimization of local RMI calls.
RMI/IIOP: JOnAS now provides support for both RMI/IIOP (Java Remote Method Invocation over Internet Inter-Orb Protocol) and RMI/JRMP by integrating the CAROL communication framework.
CMI (Cluster Method Invocation): A new ORB (Object Request Broker) used by JOnAS to provide clustering for load balancing and high availability.
JOnAS implements a set of J2EE specifications. The following list shows the specifications that are implemented by JOnAS and gives a brief description of the services provided by JOnAS.
JOnAS provides full support of the following specifications:
EJB (Enterprise JavaBean) (http://java.sun.com/products/ejb): Enterprise JavaBeans containers are provided by a set of Java classes and a tool to generate interposition classes.
JTA (Java Transaction API) (http://java.sun.com/products/jta): a Transaction Manager that provides Java Transaction API support and distributed transaction coordination.
JDBC (Java DataBase Connectivity) (http://java.sun.com/products/jdbc): a Database Manager that provides Java DataBase Connectivity support.
JMS (Java Messaging Service) (http://java.sun.com/products/jms): Java Messaging Service is provided by JORAM, a technology from ScalAgent (http://www.scalagent.com).
JMX (Java Management Extension) (http://java.sun.com/products/JavaManagement): JOnAS contains the Java Management Extension technology. Management and monitoring is available through a Web interface.
J2EE CA (J2EE Connector Architecture) (http://java.sun.com/j2ee/connector): JOnAS supports the J2EE Connector Architecture that defines a set of mechanism that enable the integration of Enterprise Information Systems (EIS).
JNDI (Java Naming and Directory Interface) (http://java.sun.com/products/jndi): Provides naming and directory functionality.
Security management.
JOnAS offers several services that can be turned on or off as required:
EJB Container Service: A set of Java classes implementing the EJB specification.
Web Container Service: A servlet/JSP engine in the JVM (Java Virtual Machine) of the Red Hat Application Server server and the loading of web applications ("WAR files") within this engine. Currently this service can be configured to use Tomcat or Jetty, although only Tomcat is supplied with Red Hat Application Server.
EAR Service: A service used for deploying complete J2EE applications; that is, applications packaged in EAR files, which themselves contain ejb-jar files and/or WAR files.
JDBC Service: JDBC 2.0 support including XA (Distributed transaction mode for JDBC 2.0) resources and connection pooling.
Security Service: This service implements the authorization mechanisms for accessing EJB components, as specified in the EJB specification. EJB security is based on the notion of roles.
Transaction Service: This is a Java Transaction Monitor called JOnAS JTM, which ensures the coordination of distributed transactions using XA. It handles two-phase commit protocol against any number of Resource Managers (XA Resources).
Messaging Service: This service is in charge of launching (or establishing connection to) an integrated JMS server. JOnAS makes use of a third-party JMS implementation. Currently the JORAM open-source JMS server is integrated and delivered with JOnAS.
Management Service: Integration of a JMX server.
J2EE CA Resource Service: Allows application component access to an external EIS.
Mail Service: Allows application components to read or send e-mail using JavaMail.
Database Service: This service is responsible for handling Datasource objects. A Datasource is a standard JDBC administrative object for handling connections to a database.
Communication and Naming Service: This service provides the JNDI API to application components and to other services to bind and lookup remote objects (for example, EJB Homes) and resource references (JDBC Datasource, Mail, and JMS connection factories, etc.)
Configuring and starting the various services is described in Section 4.1.2 JOnAS Configuration Files.
Here is a list of the main software components needed to run Red Hat Application Server:
Red Hat Enterprise Linux 3.
A Java2 Software Development Kit (SDK) version 1.4. These are available on the RHEL3 Extras Channel.
Here is a list of software components that may also be needed to run JOnAS in some configurations:
A Web server may be used in front of the Red Hat Application Server application server. The most popular Open Source web server software used is Apache.
A Database server may be needed. Any database with a JDBC driver can be used with Red Hat Application Server. Red Hat Application Server is configured to use PostgreSQL - Red Hat Edition (which is available on the RHEL3 Base Channel), although any database with a JDBC driver can be used.