File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes Dummies Guide To EJB's on jBoss 3 / Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Dummies Guide To EJB Watch "Dummies Guide To EJB New topic

Dummies Guide To EJB's on jBoss 3 / Tomcat

Alan Hicks

Joined: Mar 09, 2003
Posts: 7
Hello All,
After weeks of messing around with jBoss and every EJB example on the web I have finally got one to work. :-)
The best tutorial I found is at:
There are however some things that this tutorial leaves out. Assuming that "jBoss" is where the server has been unzipped.
1] when running the server go into the DOS prompt and type cd\jBoss\bin and hit enter then type run.bat -c all and hit enter, this will run the server in full mode which you need.
2] The jBoss 3 deployment directory is jBoss\server\all\deploy and not jBoss\deploy like most tutorials say.
3] These envirnoment variables must be setup in CLASSPATH
With these modifications and the above turtorial you should have no problems.
Good Luck
[ March 09, 2003: Message edited by: Alan Hicks ]
[ March 09, 2003: Message edited by: Alan Hicks ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Thanks for the tips, Alan. I just got JBOSS 3.0.6 up on Windows NT today and got the EJB and client working in 20 minutes using Eclipse.
However, I did notice the following:
1. jboss-common.jar was in %JBOSS_HOME%\lib and not in %JBOSS_HOME%\client.
2. I could not find a ejb.jar in %JBOSS_HOME%\lib\ext.
Otherwise, it worked fine, thanks again.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
R Schramm

Joined: Aug 21, 2003
Posts: 2
Great help... note I had to do a couple of things in addition
(note my install of jboss is jboss-3.2.1_tomcat-4.1.24)
1)add following as second line to ejb-jar.xml (all on one line...)
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "">

2) had to add jnet.jar to classpath to get SocketFactory.class (in my case: c:\jboss\client\jnet.jar)
3) also... the messages appearing in the jboss window when I deployed the jar file were quite different than the article... basically never said application deployed, instead I got file and package deployed messages.. but it all worked. Thanks so much for the simple and clear tutorial!
I agree. Here's the link:
subject: Dummies Guide To EJB's on jBoss 3 / Tomcat
It's not a secret anymore!