a/d trends: Enterprise JavaBeans and the AS/400

On Dec. 10, 1997, Sun announced that they were going to expand the Java language with a set of server-based, enterprise capable computing. This was an important announcement for Java since it meant the expansion of Java into a network capable language. Enterprise JavaBeans is a cross-platform component-based architecture that provides a platform for developing and deployment of server-based components and is capable of seamless performance.

Enterprise JavaBeans 1.0 is a new set of APIs for the Java Platform, which allows for the building of scaleable, distributed, component-based, multi-tiered applications. Enterprise JavaBeans extends the JavaBean component model so that transaction based applications can be created. It adds transaction-based processing, state management and deployment time attributes.

But what is the difference between JavaBeans and Enterprise JavaBeans? JavaBeans is a component model for visual creation of re-useable client-side components for the Java Platform. Enterprise JavaBeans have no user interface and reside entirely on an Enterprise JavaBean-aware server. The Enterprise JavaBean specifications detail the requirements of these servers and how they will interact with Enterprise JavaBeans.

JavaBeans properties are customized at design time, while Enterprise JavaBeans properties are customized at run-time through the use of environment properties. JavaBeans are distributed over the Internet using the Java Remote Method Invocation. Java RMI calls are automatic and transparent from the client as they are distributed to the server. Enterprise JavaBeans are distributed in a new format known as an ejb-jar file. These files contain all of the Java class files, deployment requirements and environment properties needed at run-time.

There are two different types of Enterprise JavaBeans: Entity and session beans. Session beans will only exist for the life of the client application. These beans will be destroyed when the application is finished or if the server ever crashes. Entity beans are similar to multi-threaded applications. Entity beans can support multiple users through crashes and shutdowns. These beans are destroyed when the server either crashes or is shutdown.

A major benefit of using Enterprise JavaBeans is its ability to take advantage of other low-level functions. Enterprise JavaBeans will use multi-threading, resource pooling and other complex APIs without any additional coding. This allows developers to create applications without having any knowledge of these low-level functions.

To ensure the safe execution of each Enterprise JavaBean, they are all required to execute within a component execution environment (or container). This environment must comply with the Enterprise JavaBean 1.0 specification. This method of execution will ensure that each environment implements a defined set of interfaces. With this type of setup, each Enterprise JavaBean can be moved from one execution environment to another without any programming.

Developers just need to know the Java language to know how to create Enterprise JavaBeans. Enterprise JavaBeans make full use of all of the existing features of the Java platform. So it shouldn’t be a surprise to anyone that Enterprise JavaBeans is platform independent. The developer does not need to know the underlying protocols to create an application allowing the developer to focus on the business logic. The Enterprise JavaBeans use JRMP, the CORBA Internet InterORB Protocol (IIOP) or another remote object protocol to access the network and other resources.

This means the AS/400 Java Developer can create server-based components using Enterprise JavaBeans. This allows you to network-enable your applications so that information can be accessed across intranets, extranets and the Internet using your DB2 database. For the AS/400, you can incorporate WebLogic [now BEA] Tengah to enable Enterprise JavaBeans. WebLogic Tengah version 3.1.1 has been packaged for the IBM AS/400e series. Tengah comes with AS/400 executables, installation scripts and other packaging information.

Enterprise JavaBeans provide a simple and server-based component container model, which can be used to create Web-enabled applications. It provides an architectural foundation for building distributed processing. This is a new way to develop, deploy and manage applications. It does this by reusing server components and sharing system resources without worrying about system-level programming. What Enterprise JavaBeans give the AS/400 Java developer is a rich new set of functions, which allow for the creation of server-based applications.

Mark Buchner is president and founder of Astech Solutions Inc. (Aurora, Ontario), which applies technology to the practical needs of the AS/400 market.