2014-10-26 1:49 GMT+04:00 Ric Bernat <r...@brinydeep.net>:
>> There is no such method to be called like on the above line.
>> "DataSource(PoolConfiguration)" is a constructor. To call a constructor you 
>> need the keyword "new".
>
> My bad: I copied some code around and dropped the "new." You are quite right: 
> I am calling the constructor.
>
>> No. A constructor creates a new object.
>
> Of course, I realize a constructor creates a new object. However, I had 
> assumed that connections opened from two separate DataSource instances would 
> still coexist in the same Tomcat connection pool.
>
> To confirm: you are saying that one DataSource instance == one connection 
> pool, period. Right?

With that code, yes.

> (...)
>
> In the context of a JAX-RS application, this means I must persist my 
> DataSource instances in memory across web service calls (which is fine, I can 
> do that), and reuse them.

Yes.

> Otherwise I simply am not getting any connection pooling at all. Right?

You get pooling for the duration of that single web service call. If
open connection several times during that single call, all those
connections will come from the same pool.

BTW,
http://en.wikipedia.org/wiki/Design_Patterns#Structural

Best regards,
Konstantin Kolinko

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

Reply via email to