[jboss-dev-forums] [Design of JCA on JBoss] - Re: JDBC/XA changes to better support MSSQL Server
adrian@jboss.org
do-not-reply at jboss.com
Tue Mar 6 13:20:05 EST 2007
Original discussion:
Problem: Need to invoke Statement.cancel() otherwise XAResource.rollback()
blocks.
anonymous wrote :
| So basically we need to add something to the jdbc resource adapter
| such that when XAResource.prepare(), commit(onePhase) or rollback()
| or for local tx Connection.commit()/rollback()
| is invoked, we check whether there are any currently "open"
| statements and issue a cancel().
|
| We already keep track of unclosed statements in WrappedConnection
| so this should be a fairly trivial change?
|
| I guess also, that if a close() is going to block,
| we should also do the same cancel() when we close statements
| (or return the statement to the prepared statement cache)
| in response to a close() on the connection wrapper.
|
and
anonymous wrote :
| I'm saying the JCA layer should do it
| (in cases where the jdbc adapter doesn't do it itself).
|
| The stack would look something like this?
|
| org.jboss.resource.adapter.jdbc.WrappedConnection.cancelStatements();
| org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkComplete();
| org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.rollback();
| tm.handleTimeout();
|
| Before doing the real delegation:
|
| com.acme.xadatasource.XAResourceImpl.rollback();
| org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.rollback();
| tm.handleTimeout();
|
| The same feature would work for local datasources as well
| since we give you a LocalXAResource that invokes the
| ManagedConnection's local commit/rollback, i.e.
|
| org.jboss.resource.adapter.jdbc.WrappedConnection.cancelStatements();
| org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkComplete();
| org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.rollback();
| org.jboss.resource.cm.TxConnectionManager$LocalXAResource.rollback();
| tm.handleTimeout();
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025517#4025517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025517
More information about the jboss-dev-forums
mailing list