-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate transaction& JTA in JBoss
PostPosted: Fri Mar 26, 2004 3:38 pm 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
HI all,

I've been digging deep into code of hibernate / jboss jta / transaction manager stuff.

I doscovered that jta transaction is kept as tread local, and tomcat
( integrated with jboss ) reuses threads ( possibly containing stale transaction in thread local )

So I have couple of questions - ok, I have 2 separate hibernate session factories inside my application - one coming from osuser,
and another from my persistence stuff ( there will be more in future ) ,
and both of them are used in the same request.

So, both of them share the same jta transaction? ( jndi name
for user transaction is default one )

If one ot sesions is stale ( for example soem exception ) and I
follow guidelines of rolling back transaction ( which I'm starting when
acquiring session ) and discarding session - then another session
session factory will refer to the same rolled back transaction?

Is there the way to kill that transaction for ever?

Or am I better off with jdbc transactions for separate session factories? ( ok, sesion factories belong to different portal application, so it could be option for me )

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject: ok, I solved my problem
PostPosted: Wed Mar 31, 2004 11:49 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
cause was trivial - wrong filter invocation order
( sitemesh was up the chain from filter closing sessions
and commiting transactions )


So, when you are living with jboss & jta - pay attention
that you really really close your sessions and commit / rollback transactions. Or you will get really strange problems.

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


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

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.