Thanks dmitry, I was a little misguided on SO, resulting in this question,
but it looks as if the issue had to do with me not closing my session after
the thread completed. I've been spoiled with tapestry-hibernate doing that
for me on non threaded transactions :) Anyhow Lance also pointed out I need
to call PerthreadManger.cleanupThread() when managing my own threads too. I
haven't added lances code as of yet, but closing the session seem to stop
the thread connection creep. Thanks for your help.
On Nov 1, 2013 3:07 AM, "Dmitry Gusev" <dmitry.gu...@gmail.com> wrote:

> 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