Actually, the OpenSessionInViewFilter does not change the behaviour. I debugged a little further so far: During normal operation (load, save, remove), the open connections grow till the maximum (3 connections per object and per operation), but the some kind of clean up purges about half of the connections. On bulk operations (e.g. load a list of objects) however, the number of connections grows until the exception is thrown. It seems to me, this is related to the manager methods and their subsequent calls being encapsulated in one transaction, and as long as it is not finished connections don't get (or can't be) closed. Any idea how one could configure/circumvent this behaviour? Kind regards and thanks for your answer, Tobias
________________________________ Von: Michael Horwitz [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 15. Juni 2007 14:28 An: [email protected] Betreff: Re: [appfuse-user] Closing connections This may also be related to the use of the OpenSessionInView filter. In AppFuse 2.0x this is commented out by default - you may try uncommenting it to see if holding the session open reduces the number of connections. I also assume with ACL that you are using method interceptors on your service methods? You may want to check that your interceptors are being applied after the transaction interceptor to make sure they all execute within the same transaction. Mike. 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. 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]
