Head First EJB is EJBs version 2.1. The App Server version that they used specifically for the book really doesn't matter. Just use any App Server that is EJB 2.1 compatible. http://java.sun.com/javaee/downloads/previous/ Just go to java.sun.com, click on J2EE and in the downloads page they show Java EE 5 but there is a link on the top of that section that has J2EE 1.4
Home Object is what is placed in the JNDI Tree that the client looks up, then calls create on it to create the actual EJB object that you want and sends a prozy to the client. The term Remote basically means that it is not in the same VM.
In fact the book uses 2.0 which is incorporated in J2EE 1.3
But 1.4 works fine, you just need to beware that the screens for the admin console and deploytool have a different layout and logic (some things are on different screens or different locations on screens).
The steps to get a clien app working are also slightly different, I explained those a while ago in another thread.
1.Add three Java archives (JARs) to your class path in the lib directory of Application Server's root installation directory: j2ee.jar, appserv-rt.jar, and appserv-admin.jar. 2.Set the values for the Java virtual machine startup options, as follows:
jvmarg value = "-Dorg.omg.CORBA.ORBInitialHost=${ORBhost}" jvmarg value = "-Dorg.omg.CORBA.ORBInitialPort=${ORBport}"
where ORBhost is Application Server's host name and ORBport is the ORB port number, whose default is 3700 for the default instance. You can obtain that information from the domain.xml file on the remote system. For details on that file, see Chapter 1 in Sun Java System Application Server Enterprise Edition 8.1 Administration Reference. Here is an example of the compilation command line (all on one line): java -classpath.;c:\Sun\AppServer.ib\j2ee.jar;c:\Sun\AppServer.ib\appservrt.jar;c:\Sun\AppServer.ib\appserv-admin.jar-Dorg.omg.CORBA.ORBInitialHost=localhost-Dorg.omg.CORBA.ORBInitialPort=3700 MEJBStandaloneClient ejb/mgmt/MEJB
the latest download includes appserver 8.2 which works the same.
42
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.