tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Hartung" <wi...@msoft.com>
Subject Re: Question on JNDI configuration
Date Tue, 03 May 2005 00:30:44 GMT
> From: "John MccLain" <jmcclain@tcshealthcare.com>
> Sent: Monday, May 02, 2005 4:23 PM

> Is it possible to add a datasource to JNDI AFTER the server has started?
We
> have a webapp that creates a DbConnection pool AFTER first user
> authentication. I would like to access this pool via JNDI conventions
> (because of 3rd party requirements), as well as through a context
variable.

Have you tried simply binding it after you've created it? I think it's
writable.

Are you creating user specific DBPools, and using JNDI as a global name
space for the 3rd party app (passing in the context name key for them to
look it up)?

Context ctx = new InitialContext();
ctx.bind("yourDBPool", getNewDBPool());

Can you leverage a Custom Resource Factory to do this for you (assuming
simply binding it doesn't work)?

Regards,

Will Hartung
(willh@msoft.com)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message