my dog learned polymorphism*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Dummies Guide To EJB Watch "Dummies Guide To EJB New topic
Author

Dummies Guide To EJB's on jBoss 3 / Tomcat

Alan Hicks
Greenhorn

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:
http://www.fawcette.com/javapro/2003_01/online/j2ee_bkurniawan_01_09_03/default_pf.asp
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
C:\jBoss\client\jboss-j2ee.jar;
C:\jBoss\client\jnp-client.jar;
C:\jBoss\client\jboss-common.jar;
C:\jBoss\client\log4j.jar;
C:\jBoss\client\jboss-client.jar;
C:\jBoss\client\jbossall-client.jar;
C:\jBoss\client\jboss-common-client.jar;
C:\jBoss\lib\ext\ejb.jar
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.
-Barry


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
Greenhorn

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" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

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: http://aspose.com/file-tools
 
subject: Dummies Guide To EJB's on jBoss 3 / Tomcat
 
Similar Threads
problem running Budi Kurniawan's sample EJB
Develop and Deploy a Simple EJB Tutorial
Simple dynamic expression evaluation not working
Help!!
Resource for EJB's on JBOSS