steve wrote:
The one in the jboss source tree operates under certain assumptions (mainly that all hibernate calls are wrapped in a JTA transaction). Thus certain things don't need to be configured.
auto_close_session is automatcially enabled in that particular mbean.
http://cvs.sourceforge.net/viewcvs.py/jboss/hibernate/src/main/org/jboss/hibernate/jmx/Hibernate.java?rev=1.12&only_with_tag=HEAD&view=auto
Thanks. I figured that out last night when I downloaded the JBoss source. I did a quick build exposing that flag and it worked fine inside my app.
I guess I don't understand how it can be assumed that you will always be inside a JTA TX -- is it not considered kosher to make read-only calls to Hibernate from a servlet layer not from inside the context of a TX?
I can understand if the JBoss version is making certain assumptions, and in that case, I will work around it. I guess I am more curious now to make sure *I* am not making a fundemental design flaw, based on that assumptions tha t you have made.