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:

http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html

My update: http://static.raibledesigns.com/downloads/howto-tomcat-jotm.html

I uploaded this update only temporarily - hopefully the patch I
submitted (http://tinyurl.com/9q4vl) 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"
        type="javax.transaction.UserTransaction"
        factory="org.objectweb.jotm.UserTransactionFactory"
        jotm.timeout="60"/>

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

    <ResourceLink name="UserTransaction" global="UserTransaction"
        type="javax.transaction.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"
        factory="org.objectweb.jndi.DataSourceFactory"
        driverClassName="com.mysql.jdbc.Driver"
        username="mojo" password="jojo"
        url="jdbc:mysql://localhost/javatest"/>

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)

Thanks,

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to