JNDI from Tomcat

  • Thread starter Darryl L. Pierce
  • Start date
D

Darryl L. Pierce

I've a servlet running on Tomcat. In it is functionality to do
authentication and account maintenance for users, but I would like to break
that functionality out of the servlet and put it into EJBs running on
JBoss.

So, the question is, has anybody experience with configuring Tomcat to
access EJBs on a separate machine via JNDI? I've done some web searches and
found nothing so far today...
 
S

Steve W. Jackson

Darryl L. Pierce said:
:I've a servlet running on Tomcat. In it is functionality to do
:authentication and account maintenance for users, but I would like to break
:that functionality out of the servlet and put it into EJBs running on
:JBoss.
:
:So, the question is, has anybody experience with configuring Tomcat to
:access EJBs on a separate machine via JNDI? I've done some web searches and
:found nothing so far today...

I'm not accessing EJBs, but I am having a Tomcat-hosted Web service (not
servlet) make JNDI calls. What I did was set up a properties file
that's in the classpath of Tomcat that's read by my service when it's
started or reloaded. A servlet can do this in its init() method, which
I've got in my Web service (JAX-RPC, if anybody cares) by virtue of
implementing the ServiceLifecycle interface. The file contains the
required properties for JNDI, namely the java.naming.factory.initial and
java.naming.provider.url properties that it needs for communing with the
directory.

HTH.

= Steve =
 
D

Darryl L. Pierce

Steve said:
I'm not accessing EJBs, but I am having a Tomcat-hosted Web service (not
servlet) make JNDI calls. What I did was set up a properties file
that's in the classpath of Tomcat that's read by my service when it's
started or reloaded. A servlet can do this in its init() method, which
I've got in my Web service (JAX-RPC, if anybody cares) by virtue of
implementing the ServiceLifecycle interface. The file contains the
required properties for JNDI, namely the java.naming.factory.initial and
java.naming.provider.url properties that it needs for communing with the
directory.

Where did you place the properties file within Tomcat's directory structure?
Also, what JARs did you have to include (if you are using JBoss) in Tomcat
to fulfill the class dependancies?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top