[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
cpslo1999
do-not-reply at jboss.com
Wed Apr 15 14:23:41 EDT 2009
I tried setting the DefaultDS as a XA Data Source using a datasource descriptor I found on the net (I can't vouch for it's correctness) and leaving my application's data source as a local-tx (like what is found in docs/examples/jca).
| <datasources>
| <xa-datasource>
| <jndi-name>DefaultDS</jndi-name>
| <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/jbossdb</xa-datasource-property>
| <xa-datasource-property name="User">user</xa-datasource-property>
| <xa-datasource-property name="Password">pass</xa-datasource-property>
| <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
|
| <track-connection-by-tx>true</track-connection-by-tx>
| <isSameRM-override-value>false</isSameRM-override-value>
| <no-tx-separate-pools/>
|
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </xa-datasource>
| </datasources>
|
My application deploys with this configuration, and my regression tests all run and pass. I do get an error on start up, however.
| 11:14:51,021 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=myapp.ear,jar=myapp-beans.jar,name=AgingImpl,service=EJB3
| 11:14:51,021 INFO [EJBContainer] STARTED EJB: myapp.control.aging.AgingImpl ejbName: AgingImpl
| 11:14:51,036 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
|
| myapp/AgingImpl/remote - EJB3.x Default Remote Business Interface
| myapp/AgingImpl/remote-myapp.client.control.aging.Aging - EJB3.x Remote Business Interface
|
| 11:14:51,239 ERROR [TimerImpl] Error invoking ejbTimeout
| org.jboss.aop.DispatcherConnectException: EJB container is not completely started, or is stopped.
| at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:304)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
|
| ...(following INFO [JndiSessionRegistrarBase] Binding messages omitted)...
|
I haven't been able to find any information on this one yet, but I'm guessing that a persisted timer is firing before the container is ready for it.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225717#4225717
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225717
More information about the jboss-user
mailing list