From my simple Java Class client, I want to initiate User Txn. Server CMPs have Txn attributes as TX_REQUIRED. Say I am carrying out 5 Txns, & say 3rd one is failed, then previous 2 must be rolled back & next Txns must be abandoned. Since my client is not a Session Bean, I have code like this, for having UserTransaction. Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, factory); ht.put(Context.PROVIDER_URL, url); InitialContext ctx = new InitialContext(ht); javax.transaction.UserTransaction userTrans = (javax.transaction.UserTransaction)ctx.lookup("javax.transaction.UserTransaction"); But at this lookup I get an error NoSuchNameFoundException. Right now I am doing this all in IBM VAJ which is having Websphere Test Environment. I have Name Server & Bean Servers running. What is the problem? If URL is wrong ? Waiting eagerly for replies...
posted 14 years ago
The JNDI name isn't right. Lookup "jta/usertransaction" instead.