----- Original Message -----
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 3:53 PM
Subject: RE: JNDI - What resources are loaded?
>
>
> On Wed, 10 Jul 2002, Keith Wannamaker wrote:
> >
> > I'm creating a J2EE application that contains serveral web applications.
> > Is there a portable J2EE way to set up serveral global parameters in
JNDI
> > that can be accessed by all the web apps?  Or, is it necessary to
duplicate
> > all the parameters in each webapp's deployment descriptor?
>
> J2EE specs don't require the ability to share resources in this way, so
> there's no portability guarantee.  But Tomcat 4.1.x supports this.  In
> server.xml, you put the resources in a <GlobalNamingResources> section at
> the top of the file (or use the admin tool to configure them).  Then,
> inside the <Context> element for each webapp, you use a <ResourceLink>
> element that, in essence, acts like a symlink in the file system and
> points at the shared global resource.  For example, you could share a
> single connection pool across webapps this way.

The other potential option is to load these resources up on the J2EE side.
You can have "initialization" classes run on server startup, and those
classes should be able to populate the JNDI tree with their own entries.

Since most J2EE based servlets use the JNDI tree from the Appserver, this
should be shared across the seperate webapps.

This should be portable across both servlet and J2EE containers, though I've
never actually done this myself.

Lots of 'shoulds' in here, I haven't done this myself. It's just an idea.

Best Regards,

Will Hartung
([EMAIL PROTECTED])




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to