[
http://jira.jboss.com/jira/browse/JBAS-4667?page=all ]
Oleg Nitz closed JBAS-4667.
---------------------------
Resolution: Deferred
After some experiments I not sure that I am right and this is a real problem which causes
incorrect behaviour. I am still thinking that the logic is incorrect, but possibly this
doesn't affect anything. Since I wouldn't like to waste the time of JBoss
developers, I've decided to close the bug for now.
Wrong logic in
CachedConnectionManager.getCloseConnectionSynchronization()
--------------------------------------------------------------------------
Key: JBAS-4667
URL:
http://jira.jboss.com/jira/browse/JBAS-4667
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JCA service
Affects Versions: JBossAS-4.0.4.GA, JBossAS-4.2.1.GA
Reporter: Oleg Nitz
If the tx is not active (for example it has STATUS_PREPARING), then the method always
returns null, even if the associated CloseConnectionSynchronization exists.
This results in wrong warnings about non-closed connections, since when the close() is
called for a connector, in CachedConnectionManager.unregisterConnection() a null value is
returned from getCloseConnectionSynchronization() and the connector remains in the list of
non-closed resources for the transaction.
I think this bug was introduced here:
http://jira.jboss.com/jira/browse/JBAS-31#action_12310798
I propose the following solution:
--- CachedConnectionManager.java.orig 2005-11-22 02:10:41.000000000 +0200
+++ CachedConnectionManager.java 2007-09-04 18:42:48.000000000 +0300
@@ -544,13 +544,13 @@
try
{
Transaction tx = tm.getTransaction();
- if (TxUtils.isActive(tx))
+ if (tx != null)
{
TransactionSynchronizer.lock(tx);
try
{
CloseConnectionSynchronization cas = (CloseConnectionSynchronization)
TransactionSynchronizer.getCCMSynchronization(tx);
- if (cas == null && createIfNotFound)
+ if (cas == null && createIfNotFound &&
TxUtils.isActive(tx))
{
cas = new CloseConnectionSynchronization();
TransactionSynchronizer.registerCCMSynchronization(tx, cas);
--
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