aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes head first EJB doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "head first EJB doubt" Watch "head first EJB doubt" New topic
Author

head first EJB doubt

Rauhl Roy
Ranch Hand

Joined: Aug 01, 2006
Posts: 401

Hi all,

May I know which J2ee application server version was used to expline the Head first EJB first exapmle and where it is on java.sun.com to download.


can you please tell me what is the Remote Home Object/ interface according to Head first EJB?


Regards,
Rahul Roy.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

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.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
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
 
jQuery in Action, 2nd edition
 
subject: head first EJB doubt