I have a small test application that uses Spring, Hibernate and connects to DB2.
Everything works fine when using WSAD + WebSphere and I am having trouble
getting the same thing going in JBoss.
My two main problems are :
1. Using JTA
2. Configuring an XA datasource for DB2
JTA
In my spring config file I am using the following transaction related details
.....
org.springframework.transaction.jta.JtaTransactionManager
transactionManagerName = java:/TransactionManager
OR
org.springframework.orm.hibernate3.HibernateTransactionManager
If I use the hibernate transaction manager everything is ok, but if I use the
JTA entry then I get the following error ...
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager' defined in class path resource
[testadmin-ctx.xml]: Initialization of bean failed; nested exception is
org.springframework.transaction.TransactionSystemException: JTA
TransactionManager is not available at JNDI location
[java:/TransactionManager]; nested exception is javax.naming.NamingException:
Object [EMAIL PROTECTED] available at JNDI location [java:/TransactionManager]
does not implement [javax.transaction.TransactionManager]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:341)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
If I look in the JBoss console I can see the TransactionManager in the java
namespace under JNDI view so I guess it must be set up wrong or my spring
config is wrong ...
+- TransactionManager (class: org.jboss.tm.TxManager)
XA Datasource
I can setup and read from the database if I copy the db2-ds.xml file and change
it for my database. However if I use the db2-xa-ds.xml then I cannot get a
connection. I am using the following driver ...
<xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
I've read through loads of posts and tried a number of configurations but still
no joy. Can anyone help ?
Thanks,
John
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883961#3883961
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883961
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user