-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: CURRENT_SESSION_CONTEXT and Mbean on jboss
PostPosted: Thu Jul 06, 2006 10:05 am 
Regular
Regular

Joined: Mon Jun 14, 2004 1:42 pm
Posts: 80
Location: Brazil
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
--------------------


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.