-->
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.  [ 3 posts ] 
Author Message
 Post subject: Transaction management with Hibernate and websphere
PostPosted: Wed Feb 16, 2005 8:09 am 
Newbie

Joined: Wed Feb 16, 2005 7:55 am
Posts: 4
I am using CMT. I also have code that explicitly begins and commits transactions as shown in the fragment below.

Transaction code is :

Code:
[color=Brown]public void insertOrUpdate(ProcessInstance pi) throws HibernateException {
Session s = HibernateUtil.openSession();
Transaction tx = s.beginTransaction();
try {
s.saveOrUpdate(pi);
if (LOGGER.isLoggable(Level.FINE)) LOGGER.fine("Inserted or updated processInstance" + pi.getProcessInstanceId() );

tx.commit();
} catch (HibernateException he) {
...
}
finally {
HibernateUtil.closeSession(s);
} [/color]


Above code works fine with JBoss and Weblogic, but throws an exception with WebSphere-
(net.sf.hibernate.transaction.JTATransaction Could not find UserTransaction in JNDI )


This is very urgent!

Thanks in advance
kappu


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 10:47 am 
Newbie

Joined: Tue Oct 19, 2004 3:39 pm
Posts: 11
As the exception says, WebSphere 5.1 and later does not make the usertransaction available in a CMT. You'll need to use IBM's extended transaction support.
There are multiple posts on this forum about this specific problem.
Unfortunately, I don't think the fix has been completely incorporated into the Hibernate releases.


Top
 Profile  
 
 Post subject: Application server independent
PostPosted: Thu Feb 24, 2005 1:10 am 
Newbie

Joined: Wed Feb 16, 2005 7:55 am
Posts: 4
I want to make my application Application server independent.

Can you please throw some light on this?

Thanks
kappu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.