Hi Andreas,
We could probably hook that up. If you want a temporary workaround
you could create the UserTransaction yourself like so:
UserTransaction utx = new
org.apache.openejb.core.CoreUserTransaction(null);
Shouldn't be too difficult to get the JNDI lookup in there, but it
will probably be next week before I can get to it.
-David
On Sep 4, 2008, at 8:55 AM, Andreas Karalus wrote:
hello guys,
We already have an application with a lot of junit tests running on
JBoss
AS. But jboss embedded causes us a lot of trouble (different jars
as in
jboss-as, etc). So I am evaluating now other embedded containers
especially
for junit testing of ejb3.0/JPA.
OpenEJB looks very good to me (installation and simple examples worked
well).
Now here is my question:
Is there a way to access the UserTransaction with openEJB from
within a
junit testcase?
I tried following, but without succes
initialContext.lookup("java:/comp/UserTransaction");
initialContext.lookup("java:/comp/env/UserTransaction");
initialContext.lookup("UserTransaction");
The way suggested in the openejb Transaction Example would not work
in our
case, we have an application with >500 Junit Tests calling EJB3.0 with
UserTransaction and I don't like changing the code.
regards,
andreas
--
View this message in context:
http://www.nabble.com/UserTransaction-in-openejb-tp19313741p19313741.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.