Tomcat is not a J2EE Server but an implementation of the Servlet Specification (which is but a part of the whole J2EE spec).
Tomcat's JNDI lookups are in-process only.
Need an open source J2EE container? Have a look at JBoss...
Hassan Sajjad wrote:
Hi
Can anyone help!
Problem with UserTransaction reference within Servlet code.
When you reference UserTransaction object in your Servlet Code, as from J2EE Specification: The J2EE Product Provider is responsible for providing an appropriate object as required ....
There's a code snippet.
Context initCtx = new InitialContext(); UserTransaction tx = (UserTransaction)initCtx.lookup("java:comp/UserTransaction");
This works fine on J2EE Impementation Servers but fails on Tomcat 4.1.3.
Exception:
javax.naming.NameNotFoundException: Name javax.transaction.UserTransaction is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:811) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183) at javax.naming.InitialContext.lookup(InitialContext.java:347)
Thanks
Hassan
PREMIER HOUSEWARES Premier Business Park, 55 Jordanvale Avenue Whiteinch Glasgow G14 0QP
UK
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
