Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.MethodInvocation


         // the session is non-XA and transacted, or XA and enrolled in a global transaction, so
         // we add the message to a transaction instead of sending it now. An XA session that has
         // not been enrolled in a global transaction behaves as a non-transacted session.

         ConnectionState connState = (ConnectionState)state.getParent();
         MethodInvocation mi = (MethodInvocation)invocation;
         Message m = (Message)mi.getArguments()[0];

         if (trace) { log.trace("sending message " + m + " transactionally, queueing on resource manager txID=" + txID + " sessionID= " + state.getSessionID()); }

         connState.getResourceManager().addMessage(txID, state.getSessionID(), (JBossMessage)m);
View Full Code Here


  
   public Object handleCreateObjectMessage(Invocation invocation) throws Throwable
   {
      JBossObjectMessage jbm = new JBossObjectMessage(0);
      
      MethodInvocation mi = (MethodInvocation)invocation;
     
      if (mi.getArguments() != null)
      {
         jbm.setObject((Serializable)mi.getArguments()[0]);
      }
     
      return new ObjectMessageProxy(jbm);
   }
View Full Code Here

  
   public Object handleCreateTextMessage(Invocation invocation) throws Throwable
  
      JBossTextMessage jbm = new JBossTextMessage(0);
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      if (mi.getArguments() != null)
      {
         jbm.setText((String)mi.getArguments()[0]);
      }
     
      return new TextMessageProxy(jbm);
   }  
View Full Code Here

  
   public Object handleSetMessageListener(Invocation invocation) throws Throwable
   {
      if (trace) { log.trace("setMessageListener()"); }
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      MessageListener listener = (MessageListener)mi.getArguments()[0];
     
      if (listener == null)
      {
         throw new IllegalStateException("Cannot set a null MessageListener on the session");
      }
View Full Code Here

  
   public Object handleCreateConnectionConsumer(Invocation invocation) throws Throwable
   {
      if (trace) { log.trace("createConnectionConsumer()"); }
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      JBossDestination dest = (JBossDestination)mi.getArguments()[0];
      String subscriptionName = (String)mi.getArguments()[1];
      String messageSelector = (String)mi.getArguments()[2];
      ServerSessionPool sessionPool = (ServerSessionPool)mi.getArguments()[3];
      int maxMessages = ((Integer)mi.getArguments()[4]).intValue();
     
      return new JBossConnectionConsumer((ConnectionDelegate)mi.getTargetObject(), dest,
                                         subscriptionName, messageSelector, sessionPool,
                                         maxMessages);
   }
View Full Code Here

  
   public Object handleAddAsfMessage(Invocation invocation) throws Throwable
   {
      if (trace) { log.trace("addAsfMessage()"); }
     
      MethodInvocation mi = (MethodInvocation)invocation;
     
      // Load the session with a message to be processed during a subsequent call to run()

      MessageProxy m = (MessageProxy)mi.getArguments()[0];
      int theConsumerID = ((Integer)mi.getArguments()[1]).intValue();
      String queueName = (String)mi.getArguments()[2];
      int maxDeliveries = ((Integer)mi.getArguments()[3]).intValue();
      SessionDelegate connectionConsumerDelegate = ((SessionDelegate)mi.getArguments()[4]);
     
      if (m == null)
      {
         throw new IllegalStateException("Cannot add a null message to the session");
      }
View Full Code Here

   public Object handleRun(Invocation invocation) throws Throwable
   {
      if (trace) { log.trace("run()"); }
     
      MethodInvocation mi = (MethodInvocation)invocation;
           
      //This is the delegate for the session from the pool
      SessionDelegate del = (SessionDelegate)mi.getTargetObject();
     
      SessionState state = getState(invocation);
     
      int ackMode = state.getAcknowledgeMode();
View Full Code Here

      ClientSessionDelegate sessionDelegate = (ClientSessionDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)sessionDelegate;

      ConnectionState connectionState = (ConnectionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      boolean transacted = ((Boolean)mi.getArguments()[0]).booleanValue();
      int ackMode = ((Integer)mi.getArguments()[1]).intValue();
      boolean xa = ((Boolean)mi.getArguments()[2]).booleanValue();

      SessionState sessionState =
         new SessionState(connectionState, sessionDelegate, transacted,
                          ackMode, xa, sessionDelegate.getDupsOKBatchSize());
View Full Code Here

      ClientConsumerDelegate consumerDelegate = (ClientConsumerDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)consumerDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      JBossDestination dest = (JBossDestination)mi.getArguments()[0];
      String selector = (String)mi.getArguments()[1];
      boolean noLocal = ((Boolean)mi.getArguments()[2]).booleanValue();
      String subscriptionName = (String)mi.getArguments()[3];
      boolean connectionConsumer = ((Boolean)mi.getArguments()[4]).booleanValue();

      int consumerID = consumerDelegate.getID();
      int bufferSize = consumerDelegate.getBufferSize();
      int maxDeliveries = consumerDelegate.getMaxDeliveries();
View Full Code Here

      ProducerDelegate producerDelegate = new ClientProducerDelegate();
      DelegateSupport delegate = (DelegateSupport)producerDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      MethodInvocation mi = (MethodInvocation)invocation;
      Destination dest = ((Destination)mi.getArguments()[0]);

      ProducerState producerState = new ProducerState(sessionState, producerDelegate, dest);

      delegate.setState(producerState);
View Full Code Here

TOP

Related Classes of org.jboss.aop.joinpoint.MethodInvocation

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.