Hi Weston,

I will just explain the scenario,
1) When I call factory.getConnection() method the container calls the 
"createManagedConnectionConnection" method with an instance of 
"ConnectionManager" being passed as an argument.If I print the class-name the 
output is "BaseConnectionManager2" class of JBoss.
2) We are expecting the entire control being taken over by JBoss.Similarly the 
task of creating the connection and attaching a listener to it is expected to 
be done by the ConnectionManager.Therefore we are relying on 
BaseConnectionManager2 to create a connection and attach a listener to it.
3) In ManagedConnection's close method we are invoking the listeners 
explicitly.So as per our understanding the task of associating a Connection 
with its litener is the task of JBoss and not our RA. Correct me If I m wrong.

ManagedConnection's close method and "notifyClose" method that invokes the 
listeners attached to the connection.
public void close() {       
  |         notifyClose();
  |         myConnection.invalidate();
  | }
  | 
  | public void notifyClose() {
  |     ConnectionEvent ce = new ConnectionEvent(this, 
ConnectionEvent.CONNECTION_CLOSED);
  |         ConnectionEventListener cel = null;
  |         for(Iterator i = eventListeners.iterator(); i != null && 
i.hasNext();) {
  |             Object obj = i.next();
  |             System.out.println("Event Listener Class = " + 
obj.getClass().getName());
  |             cel = (ConnectionEventListener)obj;
  |             cel.connectionClosed(ce);
  |         }
  |     }


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023473#4023473

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023473
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to