javax.sql

Interface ConnectionEventListener

  • All Superinterfaces:
    EventListener

    public interface ConnectionEventListener
    extends EventListener

    An object that registers to be notified of events generated by a PooledConnection object.

    The ConnectionEventListener interface is implemented by a connection pooling component. A connection pooling component will usually be provided by a JDBC driver vendor or another system software vendor. A JDBC driver notifies a ConnectionEventListener object when an application is finished using a pooled connection with which the listener has registered. The notification occurs after the application calls the method close on its representation of a PooledConnection object. A ConnectionEventListener is also notified when a connection error occurs due to the fact that the PooledConnection is unfit for future use---the server has crashed, for example. The listener is notified by the JDBC driver just before the driver throws an SQLException to the application using the PooledConnection object.

    Since:
    1.4
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void connectionClosed(ConnectionEvent event)
      Notifies this ConnectionEventListener that the application has called the method close on its representation of a pooled connection.
      void connectionErrorOccurred(ConnectionEvent event)
      Notifies this ConnectionEventListener that a fatal error has occurred and the pooled connection can no longer be used.

        

    • Method Detail

      • connectionClosed

        void connectionClosed(ConnectionEvent event)
        Notifies this ConnectionEventListener that the application has called the method close on its representation of a pooled connection.
        Parameters:
        event - an event object describing the source of the event
      • connectionErrorOccurred

        void connectionErrorOccurred(ConnectionEvent event)
        Notifies this ConnectionEventListener that a fatal error has occurred and the pooled connection can no longer be used. The driver makes this notification just before it throws the application the SQLException contained in the given ConnectionEvent object.
        Parameters:
        event - an event object describing the source of the event and containing the SQLException that the driver is about to throw

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/sql/ConnectionEventListener.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, ConnectionEventListener

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut