posted 23 years ago
Hi,
I am using oc4j(Oracle 9i App Server).
I have a stateful bean and it has been deployed succesfully.
I get javax.transaction.UserTransaction when I try to access it.
Can any one please let me know how to over come this.
I have pasted the exception and the code.
Thanks in advance.
Cheers,
Moin
javax.naming.NameNotFoundException: javax.transaction.UserTransaction not found
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:121)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:182)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:63)
at javax.naming.InitialContext.lookup(Unknown Source)
The code is as follows:
----------------------
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.transaction.UserTransaction;
private SessionContext ctx;
UserTransaction usrTrx = null;
try{
//look up for UserTransaction
usrTrx = (UserTransaction)(new InitialContext()).lookup("javax.transaction.UserTransaction");
System.out.println("ImpMgrBean beginTrans usrTrx==>"+usrTrx);
} catch(javax.naming.NamingException ne){
ne.printStackTrace();
}
[ March 23, 2002: Message edited by: Moin Shariff ]