Announcement Announcement Module
No announcement yet.
spring + tomcat5.5 + multiple database connection Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring + tomcat5.5 + multiple database connection

    I am using
    Tomact - 5.5
    Spring - 1.2.3
    iBatis - 2.0

    I want to connect multiple database, for which i m using JtaTransactionManager. Following are my configuration

    <bean id="oracleDataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="java:comp/env/jdbc/scspdb"/>

    <bean id="sybaseDataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="java:comp/env/jdbc/bcrdb" />

    <!-- Jta Transaction Manager for multiple data source -->

    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager">
    <property name="userTransactionName"><value>java:com/env/</value></property>

    But i m getting a error.

    [org.springframework.web.context.ContextLoader] - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/dataAccessContext-local.xml]: Initialization of bean failed; nested exception is org.springframework.transaction.TransactionSystemE xception: JTA UserTransaction is not available at JNDI location [java:comp/env/];

    Please help...!!!!!!

  • #2
    If you want to use the JNDI than you have to configure it from Tomcat as it's read-only. Moreover the JtaTM needs an actual implementation like (JOTM).
    See the articles on the WIKI or the reference manual.