tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Raible <>
Subject UserTransaction, JOTM and Tomcat 5.5.x
Date Tue, 07 Feb 2006 00:40:56 GMT
Howdy all,

I'm trying to get JOTM working on Tomcat 5.5.x.  I'm using 5.5.15 and
I've run into some strange issues.  More than anything, I'm looking
for explanations and (hopefully) some help.

I've updated the following tutorial for Tomcat 5.5.x:

My update:

I uploaded this update only temporarily - hopefully the patch I
submitted ( will get committed to the JOTM
project. ;-)

Strange things:

1. it's no longer possible to put a <Resource> for UserTransaction in
context.xml.  Why is that?  It works fine in Tomcat 5.0.x.

For 5.5.x, it seems you have to put the UserTransaction resource in
the <GlobalNamingResources> part of server.xml.

    <Resource name="UserTransaction" auth="Container"

Then you have to link to it from your context.xml:

    <ResourceLink name="UserTransaction" global="UserTransaction"

2. For the demo (dbtest.war) listed in this howto to work, it seems
it's essential that factory="org.objectweb.jndi.DataSource" be
specified on the "jdbc/myDB" <Resource>.  However, if you specify that
in context.xml for Tomcat 5.5.x, the DataSource doesn't get
registered.  Removing it gets the DS registered, but rollback doesn't
occur properly in the application.

    <Resource name="jdbc/myDB" auth="Container" type="javax.sql.DataSource"
        username="mojo" password="jojo"

To summarize:

Why can't a UserTransaction resource be in context.xml with Tomcat 5.5.x?
Why can't a factory attribute be specified on a datasource with Tomcat 5.5.x?

Both of these settings work fine on Tomcat 5.0.28.  I'm on OS X with JDK 5.

Of course, if anyone knows of a easier transaction manager to
integrate into Tomcat, I'm all ears. ;0)



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message