I've done some more research and it appears that there is alittle more going
on.

We have two datasources. 1 is for failover.
The 2nd database syncs with the other every 10 minutes.
For our user session we have to write to both of the databases.
This wier exception was occuring when both databases were set to the same
database.

Note: Could this be because jBoss sees the databases as different but they
are actually the same?

Thanks,
d.

-----Original Message-----
From: Ferguson, Doug [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 22, 2001 2:10 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [JBoss-user] Transaction Exception !!! / ejbStore


I figured out some more info..

Inside my ejbStore I check to make sure that the executeQuery method
only returns 1 indicating that it stored 1 row. Apparently the table
wasn't set up for a unique constraint so it actually updated 2 rows.
Now, since my if(executeUpdate != 1) then I throw an EJBException trying
to rollBack the transaction. 

The jBoss gets is this holding pattern for like 10-20 minutes and then
spits out the exception that I listed below...

For this specific example, I know I can change my table and add the unique
constraint, but whenever something wierd happens and I need to roll back
the app I will go to this wierd state.

Can anyone recommend something that I can do to prevent the blocking &
exception

Thanks,
d.

-----Original Message-----
From: David Jencks [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 19, 2001 9:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Transaction Exception !!!


How is your datasource set up?

The XAResourceImpl has a spec violation in it in that it requires that all
work including commit/rollback for a transaction be done on one
connection/xaresource whereas the spec (as explained by the jca docs)
require that the tm be able to use any xaresource to commit/rollback
whether or not that xaresource previously knew about the transaction.  I
ran into this exception when I was trying to use the XADataSourceImpl to
test the jca-xa-jdbc wrapper when I didn't have a real xa driver.  The
jca-xa connection manager does not route all work in a transaction to the
same connection: I assumed the XADataSourceLoader mechanism did, but never
investigated.

One solution is to use the 3.0 version of the jdbc jca wrapper with local
connections (I assume you do not have an xa driver)  On the other hand it
is very odd indeed that this is not a common problem if the
XADataSourceLoader mechanism is not routing all work to the same
connection.

david jencks

On 2001.09.19 20:50:28 -0400 "Ferguson, Doug" wrote:
> Does anybody have a clue what this means?
> 
> I just upgraded to 2.4.1
> 
> 
> [Login] XAException: tx=XidImpl [FormatId=257,
> GlobalId=thedug.coremetrics.com//338, BranchQual=] errorCode=XAER_NOTA
> [Login] javax.transaction.xa.XAException
> [Login]       at
>
org.jboss.pool.jdbc.xa.wrapper.XAResourceImpl.rollback(XAResourceImpl.java:2
> 10)
> [Login]       at
> org.jboss.tm.TxCapsule.rollbackResources(TxCapsule.java:1539)
> [Login]       at org.jboss.tm.TxCapsule.rollback(TxCapsule.java:394)
> [Login]       at
> org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:88)
> [Login]       at
>
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
> java:352)
> [Login]       at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
> [Login]       at
>
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12
> 8)
> [Login]       at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
> [Login]       at
>
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav
> a:286)
> [Login]       at
>
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
> nvoker.java:483)
> [Login]       at
>
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericPr
> oxy.java:335)
> [Login]       at
>
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Stateless
> SessionProxy.java:123)
> [Login]       at $Proxy63.createCoreUser(Unknown Source)
> [Login]       at
>
com.coremetrics.servlet.LoginServ$LoginValidator.<init>(LoginServ.java:736)
> [Login]       at
> com.coremetrics.servlet.LoginServ.attemptLogin(LoginServ.java:223)
> [Login]       at
> com.coremetrics.servlet.LoginServ.doPost(LoginServ.java:357)
> [Login]       at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> [Login]       at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> [Login]       at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> [Login]       at
> org.apache.tomcat.core.Handler.service(Handler.java:287)
> [Login]       at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> [Login]       at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
> 2)
> [Login]       at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> [Login]       at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:213)
> [Login]       at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> [Login]       at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> [Login]       at java.lang.Thread.run(Thread.java:484)
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to