Announcement Announcement Module
No announcement yet.
JOTM with Tomcat Managed Datasource Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JOTM with Tomcat Managed Datasource

    I have the following situation:

    I want to use JOTM to manage transactions in my application. However,
    I'd like to have the web container (tomcat) manage the datasource for me.
    I've seen information on how to do the following:
    1. Use JOTM with spring

    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager">
    <property name="userTransaction">
    <bean class="org.springframework.transaction.jta.JotmFac toryBean"/>

    2. Create JOTM datasource in tomcat

    <Resource name="jdbc/myds" auth="Container" type="javax.sql.DataSource" />
    <ResourceParams name="jdbc/myds">

    <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" />
    <ResourceParams name="UserTransaction">
    <value>org.objectweb.jotm.UserTransactionFactory </value>

    What i can't figure out is how to get the datasource defined in tomcat, and the user transaction in spring. From everything i've read, I have to use the enhydra xa datasource, and set the transaction manager on it directly. That's the part that throws me. I'm willing to gather that the org.objectweb.jndi.DataSourceFactory creates the right kind of ds. The problem is how to get the transaction manager on it.

    If anyone has any ideas/examples that wuold be extremely helpful.

  • #2
    Isn't this already covered by the jotm documentation? as a side note, jotm does not support recovery logs as far as I know - you might want to take a look at geronimo transaction manager - it can work standalone.