• Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate Transaction with Websphere

 
kalpana salve
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using CMT.


Transaction code is :


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);
}

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 )

What solution will allow me to support WebSphere?


Any..pointer... .

Thanks in advance

kalpana

I am using CMT.


Transaction code is :


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);
}

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 )

What solution will allow me to support WebSphere?


Any..pointer... .

Thanks in advance

kappu
 
Ghulam Rashid
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I read your your problem I was leaning toward classpath not set properly but it was strange. I also found good discussion at Eclipse for the same problem may be this will help Eclipse Plugin Central
 
Ghulam Rashid
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse Plugin Central
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!