After going though the JCA specs I could make that there is one-one relationship between
ConnectionEventListener AND ManagedConnection.
In the BaseWrapperManagedConnection I can see
private final Collection cels = new ArrayList();
The closeHandle(Object) in the BaseWrapperManagedConnection has
synchronized(cels)
| {
| copy = new ArrayList(cels);
| }
| for (Iterator i = copy.iterator(); i.hasNext(); )
| {
| ConnectionEventListener cel = (ConnectionEventListener)i.next();
| cel.connectionClosed(ce);
| }
which could have been replaced by
cel.connectionClosed(ce)
if we have this
private final Collection cels = new ArrayList();
replaced by
private ConnectionEventListener cel ;
I am not able to understand why we have ConnectionEventListener associated with
ManagedConnection stored as ArrayList as I expect this ArrayList will always have single
CEL.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112183#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...