Package org.jboss.jms.delegate

Examples of org.jboss.jms.delegate.SessionDelegate


  
   private void cancelDelivery(SessionDelegate sess, DeliveryInfo delivery) throws Exception
   {
     if (delivery.isShouldAck())
     {
        SessionDelegate connectionConsumerSession = delivery.getConnectionConsumerSession();
       
        //If the delivery was obtained via a connection consumer we need to cancel via that
        //otherwise we just use this session
       
        SessionDelegate sessionToUse = connectionConsumerSession != null ? connectionConsumerSession : sess;
       
        sessionToUse.cancelDelivery(new DefaultCancel(delivery.getDeliveryID(),
                                    delivery.getMessageProxy().getDeliveryCount(), false, false));     
     }
   }
View Full Code Here


      // Create the message handler
      SessionState sessionState =
         (SessionState)((DelegateSupport)invocation.getTargetObject()).getState();
      ConnectionState connectionState = (ConnectionState)sessionState.getParent();
      SessionDelegate sessionDelegate = (SessionDelegate)invocation.getTargetObject();
      ConsumerState consumerState = (ConsumerState)((DelegateSupport)consumerDelegate).getState();
      String consumerID = consumerState.getConsumerID();
      int prefetchSize = consumerState.getBufferSize();
      Executor executor = sessionState.getExecutor();
      int maxDeliveries = consumerState.getMaxDeliveries();
View Full Code Here

      return;
    }
   
    if (trace) { log.trace(this + " starting"); }
               
    SessionDelegate localdel = ((JBossSession)localSession).getDelegate();
   
    producer = localdel.createProducerDelegate(jbq);
   
    //We create the consumer with autoFlowControl = false
    //In this mode, the consumer does not handle it's own flow control, but it must be handled
    //manually using changeRate() methods
    //The local queue itself will manually send these messages depending on its state -
    //So effectively the message buffering is handled by the local queue, not the ClientConsumer
   
    SessionDelegate sourcedel = ((JBossSession)sourceSession).getDelegate();
   
    consumer = (ClientConsumerDelegate)sourcedel.createConsumerDelegate(jbq, null, false, null, false, false);
   
    clientConsumer = ((ConsumerState)consumer.getState()).getClientConsumer();
   
    clientConsumer.setSucker(true);
               
View Full Code Here

         return;
      }

      sourceSession = srcSession;
     
      SessionDelegate sourcedel = ((JBossSession)sourceSession).getDelegate();
     
      consumer = (ClientConsumerDelegate)sourcedel.createConsumerDelegate(jbq, null, false, null, false, false);
     
      clientConsumer = ((ConsumerState)consumer.getState()).getClientConsumer();

      try
      {
View Full Code Here

         {
            DeliveryInfo info = (DeliveryInfo)acks.get(0);
           
            MessageProxy mp = info.getMessageProxy();
           
            SessionDelegate del = mp.getSessionDelegate();
           
            del.redeliver(acks);
         }
      }
   }
View Full Code Here

      // Create the message handler
      SessionState sessionState =
         (SessionState)((DelegateSupport)invocation.getTargetObject()).getState();
      ConnectionState connectionState = (ConnectionState)sessionState.getParent();
      SessionDelegate sessionDelegate = (SessionDelegate)invocation.getTargetObject();
      ConsumerState consumerState = (ConsumerState)((DelegateSupport)consumerDelegate).getState();
      String consumerID = consumerState.getConsumerID();
      int prefetchSize = consumerState.getBufferSize();
      QueuedExecutor sessionExecutor = sessionState.getExecutor();
      int maxDeliveries = consumerState.getMaxDeliveries();
View Full Code Here

         {
            DeliveryInfo info = (DeliveryInfo)acks.get(0);
           
            MessageProxy mp = info.getMessageProxy();
           
            SessionDelegate del = mp.getSessionDelegate();
           
            del.redeliver(acks);
         }
      }
   }
View Full Code Here

/*     */       {
/* 616 */         DeliveryInfo info = (DeliveryInfo)acks.get(0);
/*     */
/* 618 */         MessageProxy mp = info.getMessageProxy();
/*     */
/* 620 */         SessionDelegate del = mp.getSessionDelegate();
/*     */
/* 622 */         del.redeliver(acks);
/*     */       }
/*     */     }
/*     */   }
View Full Code Here

/*     */   public Object handleClosing(Invocation invocation)
/*     */     throws Throwable
/*     */   {
/*  94 */     MethodInvocation mi = (MethodInvocation)invocation;
/*  95 */     SessionState state = getState(invocation);
/*  96 */     SessionDelegate del = (SessionDelegate)mi.getTargetObject();
/*     */
/*  98 */     if (this.trace) log.trace("handleClosing()");
/*     */
/* 101 */     if ((state.isXA()) && (!isXAAndConsideredNonTransacted(state)))
/*     */     {
View Full Code Here

/* 302 */     MethodInvocation mi = (MethodInvocation)invocation;
/* 303 */     SessionState state = getState(invocation);
/*     */
/* 305 */     int ackMode = state.getAcknowledgeMode();
/*     */
/* 307 */     SessionDelegate sd = (SessionDelegate)mi.getTargetObject();
/*     */
/* 309 */     boolean res = true;
/*     */
/* 313 */     if ((ackMode == 1) || (isXAAndConsideredNonTransacted(state)))
/*     */     {
View Full Code Here

TOP

Related Classes of org.jboss.jms.delegate.SessionDelegate

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.