tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: 7.0.4 problem
Date Thu, 18 Nov 2010 15:47:18 GMT
On 18/11/2010 15:38, Christopher Schultz wrote:
> Mark,
> 
> On 11/13/2010 7:26 AM, Mark Thomas wrote:
>> I think you have hit this:
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=50159
> 
>> Technically, 7.0.4 is sticking to the letter of the J2EE spec but it
>> isn't what applications expect. 7.0.5 will revert to the previous
>> behaviour but with an configurable option for those folks who want their
>> resource factories to behave differently.
> 
> I've just read that bug description and I'm not sure I understand it:
> every request to the JNDI lookup results in a completely new DataSource
> being created and filled with connections?
> 
> Uh, oh.
> 
> Does that mean that applications should request the DataSource from JNDI
> a single time during it's life and then re-use that DataSource indefinitely?
> 
> I'd better stop suggesting that everyone do JNDI lookups every time they
> need a db connection, then :)

That is what the J2EE spec says (section EE.5.2.4, page 67).

By adding the singleton attribute (and defaulting it to true) we can
provide the behaviour folks expect, stick to the letter of the J2EE spec
and provide folks an option that want the more unusual behaviour.

Mark

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


Mime
View raw message