EJB Sample Application


In order to test various aspects of available EJB-containers, I created a small "application": a room reservation system. This is work in progress. Currently, the application is not in a useable state, and it might never even reach it (I'm not quite sure about that). Nevertheless, the beans can be deployed and a number of test client commandline programs are available as a proof of concept.

At the moment, I already implemented most of the application logic in form of Enterprise JavaBeans. The following beans are available:

To optimize network traffic, an additional class (ReservationData) is used. This class contains all the data of a Reservation-object, but is only a serializable and not a remote object.

I do plan to add a web interface to these beans - mainly to test some toolkits for servlet-based web page creation. This part of the project has just started. For creating and editing rooms, the pages (including the servlets) have already been written and integrated with the EJBs. You need the following toolkits to use these interfaces:

Sample Code

Without some knowledge about EJBs, the code of the room reservation system will probably not be very helpful for you. See Resources on the Web below for a starting point if you are unfamiliar with the technology.

You can download the source tarball (about 48 KB). Compilation should be no problem. See the file README for details.

Recent Changes

Starting with version 0.2.5, all compilation issues should be solved. In addition, the rrsystem.ear enterprise application archive now works with JBoss.

Resources on the web

As a start, you should have a look at the EJB homepage. I have tested my sample with JBoss. Another server worth a try is the Orion server, although you must edit the code to make it work with Orion (JBoss is not yet fully compliant to the J2EE-specification).

My Homepage
Bernhard Bablok (mail @ bablokb.de)