Mike Cannon-Brookes has a great article on EJB and why it is not everything in the Java application serving world.  It is a great starting point those interested in this topic.  Another, more chaotic, article is at WhatsWrongWithEjb at the c2 wiki.  A worthy footnote is in the Mastering EJB II book on page 81 (section begins "For a while, the primary author"), that eludes to the fact that Local and Remote Objects are still cumbersome to use.

Part of the problem is RMI.  A project I am involved with that has been running since December last year is AltRMI (see left margin for some good reads).  There is another with the same aims (newer) called TRMI at SourceForge.  Sun recognize there are problems with the cumbersome nature of RMI as they have created Local Objects in the latest EJB spec. It still does not get around the fact that Remote objects are hard to use, and it essentially complicates the tasks for Bean coders.

The solution for a web-app is to be careful at your decision point for EJB versus Plain Old Java Beans (POJB) running inside the servlet context.  You may be able to fit the whole site on one box or have a load balancer that is sticky and avoid EJB all together.  That would be fine if your app does not require any RPC. 

Anyway, to prove a point some of us started a project that uses AltRMI in a bean publishing context.  It is not finished yet, but the promise is high - Transparent publishing of an object model in a container that provides other services (web server etc).  See Enterprise Object Broker.  In order to showcase this app I am trawling the internet looking for Java application that can, with the addition of an XML file detailing the pass-by-value and pass-by-reference boundaries, retrofit the app with RPC capability.  Of course this is easier said than done as most apps are not cleanly interface/impl separated (in terms of class, package and jar).  Often the author is keen to make a couple of changes I suggest as they are fairly benign.   When we get this puppy finished it should be a compelling .Net inspired Java application server.  Part of the script for Return of the Jedi perhaps...


August 12th, 2002