Examples of ConnectionEvent


Examples of javax.resource.spi.ConnectionEvent

        return physicalPipe;
    }
   
    void handleClose(BlasterConnection impl) {
       closed = true;
        ConnectionEvent ev = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
        ev.setConnectionHandle(impl);
        Vector list = (Vector) listeners.clone();
        int size = list.size();
        for (int i=0; i<size; i++) {
            ConnectionEventListener l =
                (ConnectionEventListener) list.elementAt(i);
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

            l.connectionClosed(ev);
        }
    }

    void handleError(BlasterConnection impl, Exception ex) {
        ConnectionEvent ev = null;
        if (ex != null)
            ev = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex);
        else
            ev = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED);
        Vector list = (Vector) listeners.clone();
        int size = list.size();
        for (int i=0; i<size; i++) {
            ConnectionEventListener l =
                (ConnectionEventListener) list.elementAt(i);
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

   }

   public void sendBegin() throws ResourceException
   {
      begin();
      ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
      Collection copy = new ArrayList(listeners);
      for (Iterator i = copy.iterator(); i.hasNext(); )
      {
         ConnectionEventListener cel = (ConnectionEventListener)i.next();
         try
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

   public void sendCommit() throws ResourceException
   {
      commit();

      ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
      Collection copy = new ArrayList(listeners);
      for (Iterator i = copy.iterator(); i.hasNext(); )
      {
         ConnectionEventListener cel = (ConnectionEventListener)i.next();
         try
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

   public void sendRollback() throws ResourceException
   {
      rollback();

      ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
      Collection copy = new ArrayList(listeners);
      for (Iterator i = copy.iterator(); i.hasNext(); )
      {
         ConnectionEventListener cel = (ConnectionEventListener)i.next();
         try
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

      if (destroyed.get())
         return;

      log.info("Connetion closed handle=" + handle + " for " + this);

      ConnectionEvent ce = new ConnectionEvent(this ,ConnectionEvent.CONNECTION_CLOSED);
      ce.setConnectionHandle(handle);
      Collection copy = new ArrayList(listeners);
      for (Iterator i = copy.iterator(); i.hasNext(); )
      {
         log.info("notifying 1 cel connectionClosed");
         ConnectionEventListener cel = (ConnectionEventListener)i.next();
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

      Exception ex = null;
      if (e instanceof Exception)
         ex = (Exception) e;
      else
         ex = new ResourceAdapterInternalException("Unexpected error", e);
      ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex);
      Collection copy = null;
      synchronized(listeners)
      {
         copy = new ArrayList(listeners);
      }
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

      if (destroyed.get())
         return;

      log.info("Connetion error handle=" + handle + " for " + this, e);

      ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, e);
      ce.setConnectionHandle(handle);
      Collection copy = new ArrayList(listeners);
      for (Iterator i = copy.iterator(); i.hasNext(); )
      {
         ConnectionEventListener cel = (ConnectionEventListener)i.next();
         try
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

      catch (JMSException e)
      {
         log.debug("Unable to unset exception listener", e);
      }
     
      ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, exception);
      sendEvent(event);
   }
View Full Code Here

Examples of javax.resource.spi.ConnectionEvent

               i.remove();
            }
         }
        
         mc.removeHandle(this);
         ConnectionEvent ev = new ConnectionEvent(mc, ConnectionEvent.CONNECTION_CLOSED);
         ev.setConnectionHandle(this);
         mc.sendEvent(ev);
         mc = null;
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.