Environment : WebSphere Application Server 9.0
Issue: User-Transaction JNDI lookup issue on standalone java -remote ejb client
Description:
While trying to lookup for a User-transaction, the java client throws classNotFoundException for com.ibm.ws.Transaction.JTA.UserTransactionImpl . The class is not existing in any of the following jars
- com.ibm.ws.ejb.thinclient_9.0.jar
- com.ibm.ws.admin.client_9.0.jar
- com.ibm.ws.orb_9.0.jar
Stanalone EJB Client :
Both Server and client are on different machines.
Here's the sample program which is currently in use:
Hashtable env = new Hashtable();
env.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");
env.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put("java.naming.provider.url", "corbaloc:iiop:<ip>:2812");
Context ctx = new InitialContext(env);
try {
userTran = (UserTransaction)initCtx.lookup(
"java:comp/UserTransaction");
}
catch(Exception e) {
userTran = (UserTransaction)initCtx.lookup(
"jta/usertransaction");
}
userTran.begin ();
//userTran.commit ();
} catch (Exception e){
e.printStackTrace();
}
Can anyone suggest on how do we get UserTransaction lookup on WAS 9.0. Please help .
Thanks,
Sushmitha.
#Support#SupportMigration#WebSphereApplicationServer(WAS)