-->
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.  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Thu Sep 22, 2005 3:49 am 
Newbie

Joined: Thu Sep 22, 2005 2:53 am
Posts: 4
I'm facing the same problem:
I have ejbTimeout (which has the @ejb.transaction "NotSupported") and inside ejbTimeout I call saveObject (which has @ejb.transaction "RequiresNew")...saveObject delegates the call to a DAO method where I call getCurrentSession();
The exception thrown was "Unable to locate current JTA transaction";
I modified the method where getCurrentSession was called (instead of calling sessionContext.getCurrentSession() I put the following code) :

Session s = (Session) session.get();
if (s == null) {
s = sessionFactory.openSession();
session.set(s);
}
return s;

(session is a ThreadLocal).
Now I'm receiving the following exception (I didn't include the full stacktrace):
Caused by: org.hibernate.HibernateException: Not able to obtain connection
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:113)

Any help would be appreciated.
Thanks.


Top
 Profile  
 
 Post subject: Supports
PostPosted: Sat Dec 03, 2005 5:41 am 
Newbie

Joined: Sat Dec 03, 2005 5:36 am
Posts: 5
I see your previous post and I am running into same issues when I set transaction to : "Supports". It complains that I have no JTA context. Did you find a workaround since your last post, I mean something not involving code but configuration ?
thx


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

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.