if (connectionHandle != null) {
ce.setConnectionHandle(connectionHandle);
}
int size = list.size();
for (int i=0; i<size; i++) {
ConnectionEventListener l =
(ConnectionEventListener) list.elementAt(i);
switch (eventType) {
case ConnectionEvent.CONNECTION_CLOSED:
l.connectionClosed(ce);
break;
case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
l.localTransactionStarted(ce);
break;
case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
l.localTransactionCommitted(ce);
break;
case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
l.localTransactionRolledback(ce);
break;
case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
l.connectionErrorOccurred(ce);
break;
default:
throw new IllegalArgumentException("Illegal eventType: " +
eventType);
}