Hibernate version:
3.1.3
The question:
I'm trying to customize the SessionContext class of JTA to build sessions with my own interceptor. It's easy on a normal configuration, but with an MBean config file I can't found a way to configure CURRENT_SESSION_CONTEXT_CLASS.
Looking at HibernateServiceMBean, I discovered that this and other options that can be specified in hibernate.cfg files weren't present.
I ended up extending HibernateServiceMBean to allow me to set this attribute, but i don't know if it's a wise choice.
Is HibernateServiceMBean going to be deprecated or something? IS there an easy way to configure this? Should I stop using MBean config on my Jboss?
Also I have to tell you that the JTA currentSession implementation is difficult to use "out of the box". When I create a transaction using my session, the session is not associated with the transaction. When I create the transaction and call currentSession, I can't control how the session is opened, without defining this class that I used above. It's documented in the ref guide at least ;-)
But as a sugestion, I think that the session that creates the transaction should be seted as current session in this transaction. What do you think?
And HibernateServiceMBean should have all options that a normal cfg has.
Thanks.
_________________ Alexandre Torres
--------------------
|