users@glassfish.java.net

UserTransaction lookup failed.

From: <glassfish_at_javadesktop.org>
Date: Thu, 20 Aug 2009 06:29:33 PDT

Hi,

I am using Hibernate, and I am specifying the transaction factory as:

org.hibernate.transaction.JTATransactionFactory

And within that class it is doing a JNDI lookup for

java:comp/UserTransaction

and this fails saying:

Caused by: javax.naming.NameNotFoundException: Lookup of java:comp/UserTransaction not allowed for Container managed Transaction beans

But I can lookup the UserTransaction manually with just

lookup("UserTransaction") and it find a UserTransaction instance just fine.

Is there a simple reason I can not get the UserTransaction with the java:comp/ namespace ?

Thanks

Chris
[Message sent by forum member 'milesy' (milesy)]

http://forums.java.net/jive/thread.jspa?messageID=361370