Results 1 to 2 of 2

Thread: spring + tomcat5.5 + multiple database connection

  1. #1
    Join Date
    Aug 2005
    Posts
    6

    Default 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>

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


    <!-- 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>
    </bean>

    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. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    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.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Similar Threads

  1. Replies: 2
    Last Post: May 26th, 2005, 02:30 AM
  2. Replies: 2
    Last Post: Mar 10th, 2005, 02:38 PM
  3. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM
  4. Replies: 6
    Last Post: Oct 13th, 2004, 08:36 AM
  5. Multiple inserts into database
    By netdawg in forum Data
    Replies: 6
    Last Post: Sep 29th, 2004, 10:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •