Creating new connections per thread/request is the right way.
But you should close your sessions when your thread/request completed.
Just make sure that you have enough connections in your connection pool
(i.e. pool size >= threads/requests count), and things will work fine.


On Fri, Nov 1, 2013 at 10:06 AM, George Christman
<gchrist...@cardaddy.com>wrote:

> Hello, I'm a Tapestry-Hibernate user and I just recently ran into an issue
> where all my connections were used up. After doing some research, I think
> this is do to the fact sessions aren't thread safe causing it to open up
> new connections everytime. Anyhow, I'm wondering if anybody else has
> successfully been able to Inject a hibernate session into the scheduler /
> new thread without creating new connections?
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Reply via email to