Enterprise JavaBeans: Coming soon to a server near you

Get a first look at this new component architecture, which promises to revolutionize server-based component development

1 2 Page 2
Page 2 of 2

In addition to distributed transaction coordination, the EJB specification also defines how Enterprise JavaBeans will map to CORBA objects. Due to the requirements in the specification, the following scenarios will be possible:

  • A CORBA client (written in C++, COBOL, or any other programming language supported by CORBA) can access Enterprise JavaBeans

  • A client program can mix calls to CORBA and EJB objects within a transaction

  • A transaction can span multiple EJB objects that are located on multiple CORBA-based EJB servers, provided by different vendors

This means that there are two basic types of clients that can use an Enterprise JavaBean:

  1. An Enterprise JavaBean/CORBA client that uses the JNDI to locate objects, RMI over IIOP to communicate with remote objects, and the javax.jts.UserTransaction to perform transactions. Note that this client can be written with no knowledge of CORBA or its Interface Definition Language (IDL). Instead, the runtime implicitly uses IDL based on the Enterprise JavaBeans Java remote interface.

  2. A standard CORBA client written in a programming language with a CORBA IDL mapping defined. This type of client would locate the client using a COS naming service, CORBA IDL to manipulate the objects, and the Object Transaction Service (OTS) to perform transactions.

Note that in order for the first client type to exist, the ability to use RMI over IIOP must also exist. This ability is not currently in place, but Sun is working on it. When completed, RMI over IIOP will make use of the CORBA pass-by-value extension and will allow Java applications to fully interoperate with CORBA applications developed in other programming languages. This technology is expected via an "early access" release this summer, and will also ship as a standard extension to JDK 1.2.

I'm hoping that you can now see the value of my previous columns (see Resources), which focused on the CORBA specification and showed how it worked so seamlessly with Java. In the near future, CORBA will be the glue binding both client and server objects together, no matter if they were written in Java, C++, COBOL, or even Smalltalk.

Conclusion

EJB promises to become the one technology that truly solidifies Java's foothold in the world of enterprise computing. Just as many IS managers were beginning to fear that Java was becoming a language useful only for building animated dancing-head applets, Sun has produced a specification that could become the standard for building interoperable, distributed, component software development.

We will be looking at the Java platform for the enterprise in more depth in coming months, and will, of course, particularly focus on areas of interest to the world of distributed objects. My mailbag is overflowing with reader requests for column topics -- such as a further explanation of CORBA's DII capabilities, a look at the Java Transaction Service, and in-depth remote method invocation -- which should keep me busy over the next several months. Nonetheless, if you'd lke to add any specific technology or topic for future coverage, please contact me with your suggestions.

Bryan Morgan is a senior member of the technical staff with TASC Inc. (http://www.tasc.com). He currently is using CORBA and Java to build a distributed spatial query application as part of an internal R&D project. Bryan has co-authored several books for Sams Publishing, including Visual J++ Unleashed and Java Developer's Reference. He holds a B.S. in Electrical Engineering from Clemson University.

Learn more about this topic

  • Previous Distributed Object columns

1 2 Page 2
Page 2 of 2