Package javax.resource.spi

Examples of javax.resource.spi.ConnectionEvent


         ArrayList copy;
         synchronized (cels)
         {
            copy = new ArrayList(cels);
         }
         ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
         for (int i = 0; i < copy.size(); ++i)
         {
            ConnectionEventListener cel = (ConnectionEventListener) copy.get(i);
            try
            {
View Full Code Here


         ArrayList copy;
         synchronized (cels)
         {
            copy = new ArrayList(cels);
         }
         ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
         for (int i = 0; i < copy.size(); ++i)
         {
            ConnectionEventListener cel = (ConnectionEventListener) copy.get(i);
            try
            {
View Full Code Here

         ArrayList copy;
         synchronized (cels)
         {
            copy = new ArrayList(cels);
         }
         ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
         for (int i = 0; i < copy.size(); ++i)
         {
            ConnectionEventListener cel = (ConnectionEventListener) copy.get(i);
            try
            {
View Full Code Here

         ArrayList copy;
         synchronized (cels)
         {
            copy = new ArrayList(cels);
         }
         ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
         for (int i = 0; i < copy.size(); ++i)
         {
            ConnectionEventListener cel = (ConnectionEventListener) copy.get(i);
            try
            {
View Full Code Here

     
    _driver = driver;
    _connConfig = connConfig;
    _credentials = credentials;

    _connClosedEvent = new ConnectionEvent(this,
                                           ConnectionEvent.CONNECTION_CLOSED);

    initDriverConnection();

    _lastEventTime = Alarm.getCurrentTime();
View Full Code Here

    if (_listener != null) {
      if (_connException != null) {
        sendFatalEvent(_connException);
      }

      ConnectionEvent evt;
      synchronized (this) {
        evt = _connClosedEvent;
        _connClosedEvent = null;
      }

      if (evt == null)
        evt = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);

      evt.setConnectionHandle(userConn);

      _listener.connectionClosed(evt);

      evt.setConnectionHandle(null);

      _connClosedEvent = evt;

      _lastEventTime = Alarm.getCurrentTime();
    }
View Full Code Here

  public void sendFatalEvent(Exception e)
  {
    _isPingRequired = true;
   
    if (_listener != null) {
      ConnectionEvent event;

      event = new ConnectionEvent(this,
                                  ConnectionEvent.CONNECTION_ERROR_OCCURRED,
                                  e);

      _listener.connectionErrorOccurred(event);
    }
View Full Code Here

   * When closed, the item is not put into the idle pool.
   */
  void killPool()
  {
    if (_listener != null) {
      ConnectionEvent event;

      event = new ConnectionEvent(this,
                                  ConnectionEvent.CONNECTION_ERROR_OCCURRED);

      _listener.connectionErrorOccurred(event);
    }
  }
View Full Code Here

    public void setLogWriter(java.io.PrintWriter out) throws javax.resource.ResourceException {
        logWriter = out;
    }

    protected void localTransactionCommitted() {
        ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
        Object[] elements = listeners.toArray();
        for (int i = 0; i < elements.length; i++) {
            ConnectionEventListener eventListener = (ConnectionEventListener) elements[i];
            eventListener.localTransactionCommitted(event);
        }
View Full Code Here

            eventListener.localTransactionCommitted(event);
        }
    }

    protected void localTransactionRolledback() {
        ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
        Object[] elements = listeners.toArray();
        for (int i = 0; i < elements.length; i++) {
            ConnectionEventListener eventListener = (ConnectionEventListener) elements[i];
            eventListener.localTransactionRolledback(event);
        }
View Full Code Here

TOP

Related Classes of javax.resource.spi.ConnectionEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.