OK, I worked hard on this one and I got more info to provide...
I tried to copy all my servlet files in <JRun dir>/lib/ext and it worked
just fine. OK, I know it's a silly thing to do, but at least it gives
something to work on...
My theory is that JRun uses its own classes to access the JNDI server, but
since I want to call an EJB component that is deployed in an Oracle
database, I have to use the Oracle classes instead. Placing the classes in
lib/ext forced the JVM to load these instead of JRun's.
So I continued to experiment around this theory... I found out that if I
add the WEB-INF/classes directory to the default server's classpath in the
JMC, it also works fine.
This solution is OK as long as there will be only one web application by
JRun server. Why? Because I skipped one part of the puzzle... We have
lots of *.properties files in our web applications that are used to keep
configuration information and localization ressources for each application.
For example, the /config.properties file contains parameters that are global
to our framework, which is used by all of our applications. If we put the
WEB-INF/classes directory of each of our applications in the server's
classpath, there will be a naming conflict and all the applications will use
the same config.properties file (and other files also), which is totally
wrong.
So, is there a way to put entries in the classpath that go in front of
JRun's classpath, like a set CLASSPATH=<stuff>;%CLASSPATH%, instead of just
appending stuff to it? This way, I could just add the Oracle jar files in
front of the classpath and I might be OK.
If I can't put entries in front of the classpath, looks like I'll have to
set the JRun server's classpath and create one server for every web
application we run... (Right??) What is the implication of running more
than one JRun server on the same machine? Will this be expensive in system
resources?
Thanks for any input on this...
-----Message d'origine-----
De: Ghislain Gadbois [mailto:[EMAIL PROTECTED]]
Date: 5 janvier, 2001 09:31
�: JRun-Talk
Objet: Calling an EJB from a Servlet
Hi,
I would like to know if it is possible to make a servlet running in JRun
call an EJB that is contained in an EJB container from a third party.
We use JRun to run our servlets and we deploy our EJB components in an
Oracle 8.1.7 database.
I tested my servlet from JDeveloper and I can call my EJB components
quite easily. I just have to include a couple of .jars in my classpath and
I'm in business. I tried to place these .jars in the classes directory of
my servlet, but I can't call my EJB components. I keep getting
javax.naming.NamingExceptions.
Any ideas? Thanks for your help.
Ghislain Gadbois
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists