I am new to these forums and to JBoss but certainly not new to EJB or J2EE SDK.
I have developed a J2EE app that deploys and runs fine (with the exception of crashing sometimes) on the RI server from Sun ("j2ee"). My platform is Linux 7.1 and I am using J2SE 1.4.1 and J2EE 1.3.1.
Now I wish to stop using the RI server and convert to JBoss. The RI server is crashing with over 23000 beans of one given type!
I have installed JBoss (3.0.3) okay, and then I copied the EJB JAR files (there are 4 entity bean jars and 1 session bean jar, containing a total of 44 EJB's) into the deployment directory (server/default/deploy in the JBoss path). I did not copy the EAR file produced from deploytool because that contains the j2ee-ri-specific.xml file which means it is specific to that server. (Right?)
JBoss picks up the deployment and does not produce any errors - so far so good!
Then, I try to run the client with the following command:
java -cp $CLASSPATH:
(Of course in reality it is all on one line in the script file.)
RiskNetAppClient.jar is the name of the JAR file returned from the Sun J2EE deploytool, i.e. the client jar.
leftclick.jar is a library jar that is a dependant of the client code.
RiskNetApplication is the class name that contains the "static void main(String args)" method.
Now I have the following error:
javax.naming.NameNotFoundException: comp not found
at ..... (there are 10 methods in the stack trace)
The root of the exception is the line of code that performs the "lookup()" method on InitialContext, in the startup code of the application client.
OK... now for the questions!
What do I need to add or change in the JAR files so that it will work in JBoss??
I've seen something about a "jboss.xml" file, which I can assume is similar in purpose to the j2ee-ri-specific.xml file(?) Where can I get info about this jboss.xml file and where do I need to place the file?
Are there any other files I need to include or changes to be made?
Is there an equivalent tool to "deploytool" that will create the application client JAR and the enterprise archive (EAR) for JBoss?
Is the application client jar returned by the "deploytool" suitable for use with JBoss?
How do I set up the DataSource and JDBC Drivers for JBoss. With the RI server I just used the "j2eeadmin" tool. Is there a similar tool for JBoss? The database is Oracle 9i and I'm using the oci (non-thin) driver.
I am finding the documentation that came with the JBoss download quite hard to follow. A section on converting from the RI server to JBoss would be very handy!
Questions #1, #3. See JBoss docs. I'm answering this for free, so why spend a whole lot of my time writing up the answers to your questions when its already in the docs. Its good that your are starting to use JBoss, but don't expect to be spoon feed the answers when its all easily accesible in the docs.
Question #2. No. Use of Ant is recommended.
Thanks for nothing, I already said the docs are hard to follow. They are written by someone for whom English is obviously a second language.
Has anyone got anything constructive to offer?
I am also new to JBoss and have in the past used the RI so I know how you feel. Apparently the Quick Start is what passes for documentation (I haven't got the docs you pay for yet, hopefully they are a little more informative). There is some useful information in it however, a good start is to get the template application to build and then examine the build.xml and all the stuff it generates to see what it takes to deploy an application. If you aren't familiar with Ant this will be a little challenging but Ant isn't that difficult to learn. XDoclet is the thing that actually does the stuff that the RI deploy tool does so you have to figure it out too. It should be worth it though since it makes the deploy step automatic and a part of the build process.