[JBoss JIRA] (JBTM-529) Provide a way to disable connection pooling within a transaction
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-529?page=com.atlassian.jira.plugin.s... ]
Mark Little closed JBTM-529.
----------------------------
> Provide a way to disable connection pooling within a transaction
> ----------------------------------------------------------------
>
> Key: JBTM-529
> URL: https://issues.jboss.org/browse/JBTM-529
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Environment: JBossJTA + DataSource with connection pooling (i.e.: DBCP) + Spring
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M6
>
> Attachments: patch.txt
>
>
> Suppose you are using JBossTS within you webapp, configured using Spring.
> Suppose you're doing connection pooling over JBossTS: that is, you have your data source with connection pooling managing connections obtained from the TransactionalDriver of JBossJTA.
> As of now, com.arjuna.ats.jdbc.TransactionalDriver.connect(String, Properties) is calling com.arjuna.ats.internal.jdbc.ConnectionManager.create(String, Properties) to get a connection. The latter is behaving like this:
> - if an "equivalent" connection has been already created, it's not closed and it is associated with the same transaction, return that connection
> - otherwise create a new one
> In other words, as stated by the comments in ConnectionManager source, this class is pooling connections for the duration of a transaction.
> This however this can lead to severe and hard-to-find problems when you're doing your own connection pooling above JBossJTA using a data source like DBCP. These are two scenarios in which problems can occur:
> 1) suppose you have two different data sources that are modeling two logically different databases. However, suppose you're configuring both of them to point to the same physical database (that is: same URL, same username, same password) and you're off course using the same dynamic class to drive the TransactionalDriver to the actual JDBC driver.
> Suppose transaction 1 (tx1) is started and, within its duration, a connection is asked to data source 1 (ds1) and another connection is asked to data source 2 (ds2). ds1 and ds2 are initially empty, so the request leads to the creation of two new connections, through TransactionalDriver.connect. Therefore, ds1 asks the TransactionalDriver for a new connection (conn1) and the TransactionalDriver asks the ConnectionManager to create it. conn1 is created and put into ds1, then made available to the client code. But also ds2 is requesting a new connection to the TransactionalDriver: this asks the ConnectionManager, which in turns realizes that it has been requested a connection for the same transaction (tx1), for the same URL, username and password and using the same dynamic class... then, instead of creating another connection (conn2), thanks to its pooling algorythm it returns again conn1, which then goes into ds2! Anyway, tx1 terminates without problems, because the physical database is actually the same.
> However, after tx1 has terminated and new transactions are created, because conn1 is in both ds1 and ds2, it may happen that ds1 gives away conn1 to be used for a transaction tx2 while ds2 gives away conn1 to be used for another concurrent transaction tx3. Then, during tx2 or tx3 execution the "Checking transaction and found that this connection is already associated with a different transaction!" error occurs.
> To work around this problem you could configure each data source to use a different implementation (that is, different class names!) of the dynamic class. However, another problem could still happen.
> 2) suppose you work around problem 1) by using a different dynamic class implementation for each data source. Now, suppose tx4 is started and, during its execution, a thread requests two different connections to ds1. Because of the pooling done by ConnectionManager, it may happen that ds1 receives conn1 twice from the TransactionalDriver, while thinking to receive two DIFFERENT connections. Now, suppose that the data source implementation can handle that without corrupting its internal data structures (and, based on my experiences with DBCP, I wouldn't bet on this!), however this causes conn1 to appear twice in ds1. Then, if tx5 and tx6 are two new concurrent transactions during which requests to ds1 are made, it can happen that conn1 is given to be used in both tx5 and tx6, producing again the already mentioned error.
> So, my request is to support a configuration like the one I described by adding the ability to disable connection pooling at transaction level completely.
> I'm attaching a suggested patch that provides this functionality by:
> - adding support for a connection property named POOL_CONNECTIONS_WITHIN_TRANSACTION wich is assumed to be "true" by default but that can be set to "false" as needed
> - changing ConnectionManager.create(String, Properties) to honour that property: if it is set to "false", pooling is disabled and a new connection is always created
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-529) Provide a way to disable connection pooling within a transaction
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-529?page=com.atlassian.jira.plugin.s... ]
Mark Little resolved JBTM-529.
------------------------------
Resolution: Done
For those users not migrating to IronJacamar (and to clean up), I added the POOL_CONNECTIONS property, which defaults to true.
> Provide a way to disable connection pooling within a transaction
> ----------------------------------------------------------------
>
> Key: JBTM-529
> URL: https://issues.jboss.org/browse/JBTM-529
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Environment: JBossJTA + DataSource with connection pooling (i.e.: DBCP) + Spring
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M6
>
> Attachments: patch.txt
>
>
> Suppose you are using JBossTS within you webapp, configured using Spring.
> Suppose you're doing connection pooling over JBossTS: that is, you have your data source with connection pooling managing connections obtained from the TransactionalDriver of JBossJTA.
> As of now, com.arjuna.ats.jdbc.TransactionalDriver.connect(String, Properties) is calling com.arjuna.ats.internal.jdbc.ConnectionManager.create(String, Properties) to get a connection. The latter is behaving like this:
> - if an "equivalent" connection has been already created, it's not closed and it is associated with the same transaction, return that connection
> - otherwise create a new one
> In other words, as stated by the comments in ConnectionManager source, this class is pooling connections for the duration of a transaction.
> This however this can lead to severe and hard-to-find problems when you're doing your own connection pooling above JBossJTA using a data source like DBCP. These are two scenarios in which problems can occur:
> 1) suppose you have two different data sources that are modeling two logically different databases. However, suppose you're configuring both of them to point to the same physical database (that is: same URL, same username, same password) and you're off course using the same dynamic class to drive the TransactionalDriver to the actual JDBC driver.
> Suppose transaction 1 (tx1) is started and, within its duration, a connection is asked to data source 1 (ds1) and another connection is asked to data source 2 (ds2). ds1 and ds2 are initially empty, so the request leads to the creation of two new connections, through TransactionalDriver.connect. Therefore, ds1 asks the TransactionalDriver for a new connection (conn1) and the TransactionalDriver asks the ConnectionManager to create it. conn1 is created and put into ds1, then made available to the client code. But also ds2 is requesting a new connection to the TransactionalDriver: this asks the ConnectionManager, which in turns realizes that it has been requested a connection for the same transaction (tx1), for the same URL, username and password and using the same dynamic class... then, instead of creating another connection (conn2), thanks to its pooling algorythm it returns again conn1, which then goes into ds2! Anyway, tx1 terminates without problems, because the physical database is actually the same.
> However, after tx1 has terminated and new transactions are created, because conn1 is in both ds1 and ds2, it may happen that ds1 gives away conn1 to be used for a transaction tx2 while ds2 gives away conn1 to be used for another concurrent transaction tx3. Then, during tx2 or tx3 execution the "Checking transaction and found that this connection is already associated with a different transaction!" error occurs.
> To work around this problem you could configure each data source to use a different implementation (that is, different class names!) of the dynamic class. However, another problem could still happen.
> 2) suppose you work around problem 1) by using a different dynamic class implementation for each data source. Now, suppose tx4 is started and, during its execution, a thread requests two different connections to ds1. Because of the pooling done by ConnectionManager, it may happen that ds1 receives conn1 twice from the TransactionalDriver, while thinking to receive two DIFFERENT connections. Now, suppose that the data source implementation can handle that without corrupting its internal data structures (and, based on my experiences with DBCP, I wouldn't bet on this!), however this causes conn1 to appear twice in ds1. Then, if tx5 and tx6 are two new concurrent transactions during which requests to ds1 are made, it can happen that conn1 is given to be used in both tx5 and tx6, producing again the already mentioned error.
> So, my request is to support a configuration like the one I described by adding the ability to disable connection pooling at transaction level completely.
> I'm attaching a suggested patch that provides this functionality by:
> - adding support for a connection property named POOL_CONNECTIONS_WITHIN_TRANSACTION wich is assumed to be "true" by default but that can be set to "false" as needed
> - changing ConnectionManager.create(String, Properties) to honour that property: if it is set to "false", pooling is disabled and a new connection is always created
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-529) Provide a way to disable connection pooling within a transaction
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-529?page=com.atlassian.jira.plugin.s... ]
Mark Little updated JBTM-529:
-----------------------------
Fix Version/s: 5.0.0.M5
(was: 6.0.0.Final)
> Provide a way to disable connection pooling within a transaction
> ----------------------------------------------------------------
>
> Key: JBTM-529
> URL: https://issues.jboss.org/browse/JBTM-529
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Environment: JBossJTA + DataSource with connection pooling (i.e.: DBCP) + Spring
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M5
>
> Attachments: patch.txt
>
>
> Suppose you are using JBossTS within you webapp, configured using Spring.
> Suppose you're doing connection pooling over JBossTS: that is, you have your data source with connection pooling managing connections obtained from the TransactionalDriver of JBossJTA.
> As of now, com.arjuna.ats.jdbc.TransactionalDriver.connect(String, Properties) is calling com.arjuna.ats.internal.jdbc.ConnectionManager.create(String, Properties) to get a connection. The latter is behaving like this:
> - if an "equivalent" connection has been already created, it's not closed and it is associated with the same transaction, return that connection
> - otherwise create a new one
> In other words, as stated by the comments in ConnectionManager source, this class is pooling connections for the duration of a transaction.
> This however this can lead to severe and hard-to-find problems when you're doing your own connection pooling above JBossJTA using a data source like DBCP. These are two scenarios in which problems can occur:
> 1) suppose you have two different data sources that are modeling two logically different databases. However, suppose you're configuring both of them to point to the same physical database (that is: same URL, same username, same password) and you're off course using the same dynamic class to drive the TransactionalDriver to the actual JDBC driver.
> Suppose transaction 1 (tx1) is started and, within its duration, a connection is asked to data source 1 (ds1) and another connection is asked to data source 2 (ds2). ds1 and ds2 are initially empty, so the request leads to the creation of two new connections, through TransactionalDriver.connect. Therefore, ds1 asks the TransactionalDriver for a new connection (conn1) and the TransactionalDriver asks the ConnectionManager to create it. conn1 is created and put into ds1, then made available to the client code. But also ds2 is requesting a new connection to the TransactionalDriver: this asks the ConnectionManager, which in turns realizes that it has been requested a connection for the same transaction (tx1), for the same URL, username and password and using the same dynamic class... then, instead of creating another connection (conn2), thanks to its pooling algorythm it returns again conn1, which then goes into ds2! Anyway, tx1 terminates without problems, because the physical database is actually the same.
> However, after tx1 has terminated and new transactions are created, because conn1 is in both ds1 and ds2, it may happen that ds1 gives away conn1 to be used for a transaction tx2 while ds2 gives away conn1 to be used for another concurrent transaction tx3. Then, during tx2 or tx3 execution the "Checking transaction and found that this connection is already associated with a different transaction!" error occurs.
> To work around this problem you could configure each data source to use a different implementation (that is, different class names!) of the dynamic class. However, another problem could still happen.
> 2) suppose you work around problem 1) by using a different dynamic class implementation for each data source. Now, suppose tx4 is started and, during its execution, a thread requests two different connections to ds1. Because of the pooling done by ConnectionManager, it may happen that ds1 receives conn1 twice from the TransactionalDriver, while thinking to receive two DIFFERENT connections. Now, suppose that the data source implementation can handle that without corrupting its internal data structures (and, based on my experiences with DBCP, I wouldn't bet on this!), however this causes conn1 to appear twice in ds1. Then, if tx5 and tx6 are two new concurrent transactions during which requests to ds1 are made, it can happen that conn1 is given to be used in both tx5 and tx6, producing again the already mentioned error.
> So, my request is to support a configuration like the one I described by adding the ability to disable connection pooling at transaction level completely.
> I'm attaching a suggested patch that provides this functionality by:
> - adding support for a connection property named POOL_CONNECTIONS_WITHIN_TRANSACTION wich is assumed to be "true" by default but that can be set to "false" as needed
> - changing ConnectionManager.create(String, Properties) to honour that property: if it is set to "false", pooling is disabled and a new connection is always created
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-529) Provide a way to disable connection pooling within a transaction
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-529?page=com.atlassian.jira.plugin.s... ]
Mark Little updated JBTM-529:
-----------------------------
Fix Version/s: 5.0.0.M6
(was: 5.0.0.M5)
> Provide a way to disable connection pooling within a transaction
> ----------------------------------------------------------------
>
> Key: JBTM-529
> URL: https://issues.jboss.org/browse/JBTM-529
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Environment: JBossJTA + DataSource with connection pooling (i.e.: DBCP) + Spring
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M6
>
> Attachments: patch.txt
>
>
> Suppose you are using JBossTS within you webapp, configured using Spring.
> Suppose you're doing connection pooling over JBossTS: that is, you have your data source with connection pooling managing connections obtained from the TransactionalDriver of JBossJTA.
> As of now, com.arjuna.ats.jdbc.TransactionalDriver.connect(String, Properties) is calling com.arjuna.ats.internal.jdbc.ConnectionManager.create(String, Properties) to get a connection. The latter is behaving like this:
> - if an "equivalent" connection has been already created, it's not closed and it is associated with the same transaction, return that connection
> - otherwise create a new one
> In other words, as stated by the comments in ConnectionManager source, this class is pooling connections for the duration of a transaction.
> This however this can lead to severe and hard-to-find problems when you're doing your own connection pooling above JBossJTA using a data source like DBCP. These are two scenarios in which problems can occur:
> 1) suppose you have two different data sources that are modeling two logically different databases. However, suppose you're configuring both of them to point to the same physical database (that is: same URL, same username, same password) and you're off course using the same dynamic class to drive the TransactionalDriver to the actual JDBC driver.
> Suppose transaction 1 (tx1) is started and, within its duration, a connection is asked to data source 1 (ds1) and another connection is asked to data source 2 (ds2). ds1 and ds2 are initially empty, so the request leads to the creation of two new connections, through TransactionalDriver.connect. Therefore, ds1 asks the TransactionalDriver for a new connection (conn1) and the TransactionalDriver asks the ConnectionManager to create it. conn1 is created and put into ds1, then made available to the client code. But also ds2 is requesting a new connection to the TransactionalDriver: this asks the ConnectionManager, which in turns realizes that it has been requested a connection for the same transaction (tx1), for the same URL, username and password and using the same dynamic class... then, instead of creating another connection (conn2), thanks to its pooling algorythm it returns again conn1, which then goes into ds2! Anyway, tx1 terminates without problems, because the physical database is actually the same.
> However, after tx1 has terminated and new transactions are created, because conn1 is in both ds1 and ds2, it may happen that ds1 gives away conn1 to be used for a transaction tx2 while ds2 gives away conn1 to be used for another concurrent transaction tx3. Then, during tx2 or tx3 execution the "Checking transaction and found that this connection is already associated with a different transaction!" error occurs.
> To work around this problem you could configure each data source to use a different implementation (that is, different class names!) of the dynamic class. However, another problem could still happen.
> 2) suppose you work around problem 1) by using a different dynamic class implementation for each data source. Now, suppose tx4 is started and, during its execution, a thread requests two different connections to ds1. Because of the pooling done by ConnectionManager, it may happen that ds1 receives conn1 twice from the TransactionalDriver, while thinking to receive two DIFFERENT connections. Now, suppose that the data source implementation can handle that without corrupting its internal data structures (and, based on my experiences with DBCP, I wouldn't bet on this!), however this causes conn1 to appear twice in ds1. Then, if tx5 and tx6 are two new concurrent transactions during which requests to ds1 are made, it can happen that conn1 is given to be used in both tx5 and tx6, producing again the already mentioned error.
> So, my request is to support a configuration like the one I described by adding the ability to disable connection pooling at transaction level completely.
> I'm attaching a suggested patch that provides this functionality by:
> - adding support for a connection property named POOL_CONNECTIONS_WITHIN_TRANSACTION wich is assumed to be "true" by default but that can be set to "false" as needed
> - changing ConnectionManager.create(String, Properties) to honour that property: if it is set to "false", pooling is disabled and a new connection is always created
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-529) Provide a way to disable connection pooling within a transaction
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-529?page=com.atlassian.jira.plugin.s... ]
Mark Little reassigned JBTM-529:
--------------------------------
Assignee: Mark Little (was: Tom Jenkinson)
> Provide a way to disable connection pooling within a transaction
> ----------------------------------------------------------------
>
> Key: JBTM-529
> URL: https://issues.jboss.org/browse/JBTM-529
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Environment: JBossJTA + DataSource with connection pooling (i.e.: DBCP) + Spring
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 6.0.0.Final
>
> Attachments: patch.txt
>
>
> Suppose you are using JBossTS within you webapp, configured using Spring.
> Suppose you're doing connection pooling over JBossTS: that is, you have your data source with connection pooling managing connections obtained from the TransactionalDriver of JBossJTA.
> As of now, com.arjuna.ats.jdbc.TransactionalDriver.connect(String, Properties) is calling com.arjuna.ats.internal.jdbc.ConnectionManager.create(String, Properties) to get a connection. The latter is behaving like this:
> - if an "equivalent" connection has been already created, it's not closed and it is associated with the same transaction, return that connection
> - otherwise create a new one
> In other words, as stated by the comments in ConnectionManager source, this class is pooling connections for the duration of a transaction.
> This however this can lead to severe and hard-to-find problems when you're doing your own connection pooling above JBossJTA using a data source like DBCP. These are two scenarios in which problems can occur:
> 1) suppose you have two different data sources that are modeling two logically different databases. However, suppose you're configuring both of them to point to the same physical database (that is: same URL, same username, same password) and you're off course using the same dynamic class to drive the TransactionalDriver to the actual JDBC driver.
> Suppose transaction 1 (tx1) is started and, within its duration, a connection is asked to data source 1 (ds1) and another connection is asked to data source 2 (ds2). ds1 and ds2 are initially empty, so the request leads to the creation of two new connections, through TransactionalDriver.connect. Therefore, ds1 asks the TransactionalDriver for a new connection (conn1) and the TransactionalDriver asks the ConnectionManager to create it. conn1 is created and put into ds1, then made available to the client code. But also ds2 is requesting a new connection to the TransactionalDriver: this asks the ConnectionManager, which in turns realizes that it has been requested a connection for the same transaction (tx1), for the same URL, username and password and using the same dynamic class... then, instead of creating another connection (conn2), thanks to its pooling algorythm it returns again conn1, which then goes into ds2! Anyway, tx1 terminates without problems, because the physical database is actually the same.
> However, after tx1 has terminated and new transactions are created, because conn1 is in both ds1 and ds2, it may happen that ds1 gives away conn1 to be used for a transaction tx2 while ds2 gives away conn1 to be used for another concurrent transaction tx3. Then, during tx2 or tx3 execution the "Checking transaction and found that this connection is already associated with a different transaction!" error occurs.
> To work around this problem you could configure each data source to use a different implementation (that is, different class names!) of the dynamic class. However, another problem could still happen.
> 2) suppose you work around problem 1) by using a different dynamic class implementation for each data source. Now, suppose tx4 is started and, during its execution, a thread requests two different connections to ds1. Because of the pooling done by ConnectionManager, it may happen that ds1 receives conn1 twice from the TransactionalDriver, while thinking to receive two DIFFERENT connections. Now, suppose that the data source implementation can handle that without corrupting its internal data structures (and, based on my experiences with DBCP, I wouldn't bet on this!), however this causes conn1 to appear twice in ds1. Then, if tx5 and tx6 are two new concurrent transactions during which requests to ds1 are made, it can happen that conn1 is given to be used in both tx5 and tx6, producing again the already mentioned error.
> So, my request is to support a configuration like the one I described by adding the ability to disable connection pooling at transaction level completely.
> I'm attaching a suggested patch that provides this functionality by:
> - adding support for a connection property named POOL_CONNECTIONS_WITHIN_TRANSACTION wich is assumed to be "true" by default but that can be set to "false" as needed
> - changing ConnectionManager.create(String, Properties) to honour that property: if it is set to "false", pooling is disabled and a new connection is always created
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-531) com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-531?page=com.atlassian.jira.plugin.s... ]
Mark Little closed JBTM-531.
----------------------------
> com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called
> ------------------------------------------------------------------------------------------
>
> Key: JBTM-531
> URL: https://issues.jboss.org/browse/JBTM-531
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M5
>
>
> com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called by com.arjuna.ats.internal.jdbc.DirectRecoverableConnection.
> From what I could understand (but I'm not sure of this), after calling com.arjuna.ats.internal.jdbc.DirectRecoverableConnection.closeCloseCurrentConnection() the DirectRecoverableConnection won't be used anymore, so that method could be a good candidate to call _dynamicConnection.shutDownDataSource(_theDataSource) and to null both _dynamicConnection and _theDataSource.
> This problem could be quite severe, because if the XADataSource needs to be shut down in order to release resources, this could lead to leaks.
> Moreover, I was wondering if a caching of the dynamic class wouldn't be a good idea... as of now, a NEW XA data source is created every time a new connection is requested... and this could be expensive...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-531) com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-531?page=com.atlassian.jira.plugin.s... ]
Mark Little resolved JBTM-531.
------------------------------
Fix Version/s: 5.0.0.M5
(was: 6.0.0.Final)
Resolution: Out of Date
Method no longer exists.
> com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called
> ------------------------------------------------------------------------------------------
>
> Key: JBTM-531
> URL: https://issues.jboss.org/browse/JBTM-531
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M5
>
>
> com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called by com.arjuna.ats.internal.jdbc.DirectRecoverableConnection.
> From what I could understand (but I'm not sure of this), after calling com.arjuna.ats.internal.jdbc.DirectRecoverableConnection.closeCloseCurrentConnection() the DirectRecoverableConnection won't be used anymore, so that method could be a good candidate to call _dynamicConnection.shutDownDataSource(_theDataSource) and to null both _dynamicConnection and _theDataSource.
> This problem could be quite severe, because if the XADataSource needs to be shut down in order to release resources, this could lead to leaks.
> Moreover, I was wondering if a caching of the dynamic class wouldn't be a good idea... as of now, a NEW XA data source is created every time a new connection is requested... and this could be expensive...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-531) com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-531?page=com.atlassian.jira.plugin.s... ]
Mark Little reassigned JBTM-531:
--------------------------------
Assignee: Mark Little (was: Tom Jenkinson)
> com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called
> ------------------------------------------------------------------------------------------
>
> Key: JBTM-531
> URL: https://issues.jboss.org/browse/JBTM-531
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.5.0, 4.6.0
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 6.0.0.Final
>
>
> com.arjuna.ats.internal.jdbc.DynamicClass.shutdownDataSource(XADataSource) is never called by com.arjuna.ats.internal.jdbc.DirectRecoverableConnection.
> From what I could understand (but I'm not sure of this), after calling com.arjuna.ats.internal.jdbc.DirectRecoverableConnection.closeCloseCurrentConnection() the DirectRecoverableConnection won't be used anymore, so that method could be a good candidate to call _dynamicConnection.shutDownDataSource(_theDataSource) and to null both _dynamicConnection and _theDataSource.
> This problem could be quite severe, because if the XADataSource needs to be shut down in order to release resources, this could lead to leaks.
> Moreover, I was wondering if a caching of the dynamic class wouldn't be a good idea... as of now, a NEW XA data source is created every time a new connection is requested... and this could be expensive...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-789) XA connections leak when no modifier available
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-789?page=com.atlassian.jira.plugin.s... ]
Mark Little closed JBTM-789.
----------------------------
> XA connections leak when no modifier available
> ----------------------------------------------
>
> Key: JBTM-789
> URL: https://issues.jboss.org/browse/JBTM-789
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.11.0
> Environment: JBoss Transactions 4.11, Tomcat, Spring
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M5
>
> Attachments: Patch JBTM-789.txt
>
>
> I recently upgraded JBossTS from 4.6.1 GA to 4.11 Final. I see that bug JBTM-532 that I opened against 4.5 and 4.6 should have been fixed in 4.8.0. However, besides still having a null _theModifier when using PostgreSQL, the current (4.11) implementation of com.arjuna.ats.internal.jdbc.ConnectionImple.close() has a problem.
>
> I mean, if _theModifier is null, a comment says: "no indication about connections, so assume close immediately". However in this case only _theConnection (java.sql.Connection) is closed and set to null, while _recoveryConnection.closeCloseCurrentConnection() is not called, leading to an XAConnection leak.
> What I would expect is that if _theModifier is null, a log entry were added but nothing else were done; in particular I would expect not to return and let the following "if (!delayClose)" (towards the end of the method) close both the connections immediately.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (JBTM-789) XA connections leak when no modifier available
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-789?page=com.atlassian.jira.plugin.s... ]
Mark Little resolved JBTM-789.
------------------------------
Fix Version/s: 5.0.0.M5
(was: 6.0.0.Final)
Resolution: Done
> XA connections leak when no modifier available
> ----------------------------------------------
>
> Key: JBTM-789
> URL: https://issues.jboss.org/browse/JBTM-789
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Resource Manager
> Affects Versions: 4.11.0
> Environment: JBoss Transactions 4.11, Tomcat, Spring
> Reporter: Mauro Molinari
> Assignee: Mark Little
> Priority: Critical
> Fix For: 5.0.0.M5
>
> Attachments: Patch JBTM-789.txt
>
>
> I recently upgraded JBossTS from 4.6.1 GA to 4.11 Final. I see that bug JBTM-532 that I opened against 4.5 and 4.6 should have been fixed in 4.8.0. However, besides still having a null _theModifier when using PostgreSQL, the current (4.11) implementation of com.arjuna.ats.internal.jdbc.ConnectionImple.close() has a problem.
>
> I mean, if _theModifier is null, a comment says: "no indication about connections, so assume close immediately". However in this case only _theConnection (java.sql.Connection) is closed and set to null, while _recoveryConnection.closeCloseCurrentConnection() is not called, leading to an XAConnection leak.
> What I would expect is that if _theModifier is null, a log entry were added but nothing else were done; in particular I would expect not to return and let the following "if (!delayClose)" (towards the end of the method) close both the connections immediately.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months