FileDocCategorySizeDatePackage
UnpooledConnectionEventListener.javaAPI DocGlassfish v2 API3864Thu Jul 19 03:02:58 BST 2007com.sun.enterprise.resource

UnpooledConnectionEventListener

public class UnpooledConnectionEventListener extends ConnectionEventListener
This class is a ConnectionEventListener for handling the "close" of a ManagedConnection that is not acquired through the appserver's pool. The ManagedConnection is simply destroyed after close is called Such an "unpooled" ManagedConnection is obtained for testConnectionPool and the ConnectorRuntime.getConnection() APIs
author
Aditya Gore
since
SJSAS 8.1

Fields Summary
private static Logger
_logger
Constructors Summary
Methods Summary
public voidbadConnectionClosed(ConnectionEvent evt)
Resource adapters will signal that the connection being closed is bad.

param
evt ConnectionEvent

        ManagedConnection mc = (ManagedConnection) evt.getSource();
        mc.removeConnectionEventListener(this);
        connectionClosed(evt);
    
public voidconnectionClosed(ConnectionEvent evt)


        
        ManagedConnection mc = (ManagedConnection) evt.getSource();
        try {
            mc.destroy();
        } catch (Throwable re) {
            if (_logger.isLoggable(Level.FINE)) {
                _logger.fine("error while destroying Unpooled Managed Connection");
            }
        }
        if (_logger.isLoggable(Level.FINE)) {
            _logger.fine("UnpooledConnectionEventListener: Connection closed");
        }
    
public voidconnectionErrorOccurred(ConnectionEvent evt)

        //no-op
    
public voidlocalTransactionCommitted(ConnectionEvent evt)

         // no-op
    
public voidlocalTransactionRolledback(ConnectionEvent evt)

        // no-op
    
public voidlocalTransactionStarted(ConnectionEvent evt)

            // no-op