• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to enlist XAResource

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, we are migrating from weblogic6.1 to was5.
One of application caches uses XAResource enlisted to session bean transaction. It helps to detect end of session and delete information about user from the cache. (Xid of the transaction is the key in HashTable)
I can't find documentation about enlisting XAResource in WAS. I decompiled several jar files and found WebSphereTransactionManager and TransactionManagerFactory classes but it didn't help much.
This is weblogic code:
weblogic.transaction.TransactionManager tm = weblogic.transaction.TxHelper.getTransactionManager();
if ( statically )
{tm.registerStaticResource( name, resource );
}
else
{tm.registerDynamicResource( name, resource );
}
I try to enlist resource excplicitly in WAS but it throws IllegalStateException.
WebSphereTransactionManager tm = TransactionManagerFactory.getTransactionManager();
Logger.getGenericLog().debug(" LauncherBean.startUp transaction Status = " + tm.getStatus());
Transaction tr = tm.getTransaction();
tr.enlistResource( resource );
Despite transaction status is 0 (Active)
java.lang.IllegalStateException
at com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:444)
at com.netcracker.ejb.session.security.LauncherBean.startup(LauncherBean.java:81)
is thrown.
Can anybody explain how to resgister (or enlist)XAResource in WAS. If you have usefull urls,please, post them here.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not just use Session Synchronization? That's the J2EE standard way of doing this. There is no other supported mechanism.
Kyle
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic