[
http://jira.jboss.com/jira/browse/JBAS-5171?page=comments#action_12397337 ]
Alexey Loubyansky commented on JBAS-5171:
-----------------------------------------
I've added a testcase for this
$ svn ci -m"JBAS-5171 testcase"
src/main/org/jboss/test/jca/test/ManagedDeploymentUnitTestCase.java
src/resources/jca/deployment/track-connection-by-tx-ds.xml
Sending src\main\org\jboss\test\jca\test\ManagedDeploymentUnitTestCase.java
Adding src\resources\jca\deployment\track-connection-by-tx-ds.xml
Transmitting file data ..
Committed revision 69446.
and a fix. Can this be considered as proper?
Index:
main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
(revision 69385)
+++ main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
(working copy)
@@ -495,7 +495,7 @@
@ManagementProperty(name="track-connection-by-tx")
public Boolean getTrackConnectionByTransaction()
{
- return trackConnectionByTransaction;
+ return getLocalTransactions() || trackConnectionByTransaction;
}
TxConnectionManager is track-connection-by-tx false by default
--------------------------------------------------------------
Key: JBAS-5171
URL:
http://jira.jboss.com/jira/browse/JBAS-5171
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JCA service
Affects Versions: JBossAS-5.0.0.Beta3
Reporter: Adrian Brock
Assigned To: Alexey Loubyansky
Priority: Critical
Fix For: JBossAS-5.0.0.Beta4
The TxConnectionManager is always configured to be track-connection-by-tx by default.
The old xslt used to do some complicated logic to try to determine the value
XA with track-connection-by-tx
<xsl:choose>
<xsl:when test="(xa-transaction) and (track-connection-by-tx)">
<attribute name="TrackConnectionByTx">true</attribute>
<attribute name="LocalTransactions">false</attribute>
</xsl:when>
XA with interleaving
<xsl:when test="(xa-transaction)">
<attribute name="TrackConnectionByTx">false</attribute>
<attribute name="LocalTransactions">false</attribute>
</xsl:when>
Non XA MUST BE track-connection-by-tx
<xsl:otherwise>
<attribute name="TrackConnectionByTx">true</attribute>
<attribute name="LocalTransactions">true</attribute>
</xsl:otherwise>
</xsl:choose>
The last part is not being done by the new connection factory deployer/metadata.
In fact, to simplify it (and answer some FAQs), I suggested that
<track-connection-by-tx/> should be "dropped" and set to true all the time
(with a warning about deprecation when somebody tries to use it).
Instead users of XA should explicity enable <interleaving/>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira