On 6/15/07, Tobias Vogel <[EMAIL PROTECTED]> wrote:
Hi all,

I ported the ACL example from AppFuse-1.9.x to AppFuse-2. I now started
a test case with about 10000 secured objects and then called the
PersonManager's getPerson()-method. After a short time this results in a
SQLException stating "Too many connections". With the command line tool
(mysql) i then watched the process list during typical application
behaviour. While in "normal operation", there a never more than 5-10
open connections, with the ACL secured domain object (especially many of
them), they suddenly increase dramatically (up to 100, which is the
server's limit). Even after the exception is thrown, these connections
are held open and won't timeout, which leads me to the conclusion, that
the sessionFactory keeps the connections open.

The difference in the DAOs is, that they use getSession().createQuery()
(instead of getHibernateTemplate()). This method is never used in
AppFuse nor ist tutorials, so I wonder, if this somehow has something to
with the problem.

You might try using getSessionFactory().getCurrentSession() instead of
getSession().

Matt


Does someone have any experience on this topic and cann tell about the
caveats, how to avoid it?

Kind regards,
Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to