This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

DWR/OpenSessionInView ConnectionPool leak?

Recently updated dwr (from a 1.0 version) because I introduced a dwr bean that required session scope. I switched our DWR configuration over to the "new style" using <dwr:controller>.

Everything is happy except that one of the DWR beans (which did work previously) now produces dbcp exhausted errors. We are using the OpenSessionInViewFilter pattern with singleSession set to false. (setting singleSession to true fixes this problem but introduces numerous other problems application-wide).

I understand that the OSIV filter is holding a connection open each time a db call is made and that this is the origin of the problem. I have some theories as to what I need to do about this, but nothing seems to be working out properly. I've tried moving the definition of the ajax bean out to the spring-beans instead of within the dispatcher servlet, but then the dwr controller does not seem to be able to see the bean. I've tried wrapping both the ajax bean and the referred to bean (pullSystemDataAdr) in transactions using baseTransactionProxy but that seems to interfere with DwrController being able to find them as well (I get errors about the beans not existing).

I'm a little baffled as to what direction to take from here, anyone have any pointers?