-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob,

On 11/17/2010 7:07 AM, Rob Gregory wrote:
> Is it possible to just store my existing collection of datasources in
> some global context? 
> 
> I.e. 
> initCtx = new InitialContext();  
> Context envCtx  = (Context)initCtx.lookup("java:/comp/env");
> envCtx.bind("datasource_live", objLiveDatasource);
> envCtx.bind("datasource_test", objTestDatasource);
> 
> or something along those lines?

The above isn't going to work because Tomcat provides webapp isolation
in the JNDI space.

You should look into the documentation for Tomcat's JMX beans: I'm sure
there is a way to use those to create on-the-fly DataSources (really
DataSourceFactories I think) using the mbeans that Tomcat exposes.
Running under a SecurityManager may complicate that effort.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzkBlwACgkQ9CaO5/Lv0PAh5wCeKQssMRezSzwagZ9AmCZuZf/5
5gwAoMPy5pYlKYgyYM6UNh/nnH3DAZiI
=jH6U
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to