You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Boris Kobilkovsky (JIRA)" <ji...@apache.org> on 2009/10/20 22:36:59 UTC
[jira] Created: (TRANSACTION-36) NullPointerException when JCA
connector is used under load
NullPointerException when JCA connector is used under load
----------------------------------------------------------
Key: TRANSACTION-36
URL: https://issues.apache.org/jira/browse/TRANSACTION-36
Project: Commons Transaction
Issue Type: Bug
Reporter: Boris Kobilkovsky
MapManagedConnection.close() is invalidated after all the listeners are notified. However, the connection maybe resused before the methods ends. The solution is simple:
public void close() {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
// move invalidation before calling the listeners
event.setConnectionHandle(connection);
connection.invalidate();
connection = null;
for (Iterator it = listeners.iterator(); it.hasNext();) {
((ConnectionEventListener) it.next()).connectionClosed(event);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.