we use seam/spring/hibernate in our application. We detected a problem that database connections are not released after each request during seam conversations. Then if we have many conversations we can run out of connections.
Let me explain this issue a little bit more:
If a conversation starts a session is opened. This session is bound to the conversation and borrows a database connection from the pool.
After the request the session doesn't have to be closed necessarily, but the session should be disconnected (to release the connection).
What happens in the code (org.jboss.seam.ioc.spring.SeamManagedSessionFactoryBean) is that the session only is 'marked' as closed.
Later seam recognizes that the conversation is still opened and the session will not be closed at the end of the request. The connection is therefore
not returned to the pool for many requests until the conversation ends.
For our case we fixed this problem by slightly changing the code of org.jboss.seam.ioc.spring.SeamManagedSessionFactoryBean (see the patch file). We added code to disconnect the session