[Persistence, JBoss/CMP, Hibernate, Database] - JBoss AS 4.0.5 XA Datasource problem
by tfite01
Hopefully someone can lend me some help. I've come across a problem while upgrading from JBoss AS 3.x to JBoss AS 4.0.5 GA.
I have a MDB that is creating both non-XA and XA Datasource connections in the same MDB instance. This used to work in JBoss AS 3.2.3, but now in JBoss AS 4.0.5 it causes the following runtime exception:
2007-01-09 11:32:12,410 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message):
java.lang.IllegalStateException: Transaction has terminated TransactionImpl:XidImpl[FormatId=257, GlobalId=localhost/31, BranchQual=, localId=31]
at org.jboss.tm.TransactionImpl.lock(TransactionImpl.java:834)
at org.jboss.tm.TransactionImpl.associateCurrentThread(TransactionImpl.java:794)
at org.jboss.tm.TxManager.associateThread(TxManager.java:497)
at org.jboss.tm.TxManager.resume(TxManager.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:460)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
2007-01-09 11:32:12,411 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Exception in JMSCI message listener
javax.ejb.EJBException: RuntimeException
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:417)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: Transaction has terminated TransactionImpl:XidImpl[FormatId=257, GlobalId=localhost/31, BranchQual=, localId=31]
at org.jboss.tm.TransactionImpl.lock(TransactionImpl.java:834)
at org.jboss.tm.TransactionImpl.associateCurrentThread(TransactionImpl.java:794)
at org.jboss.tm.TxManager.associateThread(TxManager.java:497)
at org.jboss.tm.TxManager.resume(TxManager.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:460)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
... 12 more
2007-01-09 11:32:12,412 ERROR [org.jboss.jms.asf.StdServerSession] failed to commit/rollback
java.lang.IllegalStateException: Wrong tx association: expected TransactionImpl:XidImpl[FormatId=257, GlobalId=localhost/31, BranchQual=, localId=31] was null
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:325)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
All Datasources are connecting to Oracle 10g databases. I've used the same oracle-ds.xml config file in both JBoss AS 3.2.3 and JBoss AS 4.0.5. The only difference in the environment is that I am running JBoss AS 3.2.3 with jdk 1.4 and JBoss AS 4.0.5 with jdk 1.5.
In my oracle-ds.xml I'm using the <no-tx-datasource> ... </no-tx-datasource> schema objects for the non-XA Datasource and of course the <xa-datasource> ... </xa-datasource> for the XA Datasources involved in the transaction.
Again this works fine in JBoss AS 3.2.3, but when I deploy this to JBoss 4.0.5 GA it fails.
Any help would be appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999606#3999606
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999606
19 years, 3 months
[Clustering/JBoss] - Load balance policy problem
by xyoungli
We have an application where we need to customize JBoss LoadBalancePolicy. What we have found is that JBoss gives erroneous target information upon restart of server instances in a cluster. Our setup is as follows:
- JBoss version: 4.0.3SP1
- OS: Windows XP
- cluster: 2 server instances
- custom load balance policy (LBP): a simple class implementing LoadBalancePolicy. When the count of available targets changes, randomly chooses a target.
Initially, both server instances are started, the printout from our custom LBP is as follows:
Tue Jan 09 10:46:35 EST 2007 TARGET COUNT: 2
which is good.
Then, I stopped one server instance, and the printout is as follows:
Tue Jan 09 10:46:57 EST 2007 TARGET COUNT: 1
which is good too.
Then I started the server instance, and the printout is as follows:
Tue Jan 09 10:47:57 EST 2007 TARGET COUNT: 2
Tue Jan 09 10:47:57 EST 2007 TARGET COUNT: 1
Tue Jan 09 10:48:03 EST 2007 TARGET COUNT: 2
Our LBP's chooseTarget method was called with the right number of targets, and then wrong number of targets(1), and then the right number of targets again.
Further, after I restarted the server instances several times, the target count started changing back and forth between 1 and 2.
What is wrong? Thanks for your input in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999587#3999587
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999587
19 years, 3 months