Christopher Schultz wrote:
Mikolaj Rydzewski wrote:
| You should get DataSource object from JNDI
| first, and then pass it to other threads. Every thread should just call
| DataSource.getConnection().

That's a bad idea. The reason you store the DataSource in JNDI is so
that it is universally available and replaceable. Caching the DataSource
somewhere else is counter-productive.
I'd rather get such objects from JNDI during application startup, and implement functionality to 'reload' them on demand.

In general you don't know whether JNDI call will be local or remote.

--
Mikolaj Rydzewski <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to