Package org.jboss.jms.destination

Examples of org.jboss.jms.destination.JBossDestination


      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();
View Full Code Here


      ClientBrowserDelegate browserDelegate = (ClientBrowserDelegate)invocation.invokeNext();
      DelegateSupport delegate = (DelegateSupport)browserDelegate;

      SessionState sessionState = (SessionState)getState(invocation);

      JBossDestination destination = (JBossDestination)mi.getArguments()[0];
      String selector = (String)mi.getArguments()[1];

      BrowserState state =
         new BrowserState(sessionState, browserDelegate, destination, selector);
View Full Code Here

   protected void checkConsumerAccess(Invocation invocation) throws Throwable
   {
      ConsumerAdvised del = (ConsumerAdvised)invocation.getTargetObject();
      ServerConsumerEndpoint cons = (ServerConsumerEndpoint)del.getEndpoint();
      ServerConnectionEndpoint conn = cons.getSessionEndpoint().getConnectionEndpoint();
      JBossDestination dest = cons.getDestination();
     
      check(dest, CheckType.READ, conn);
   }
View Full Code Here

      {
         // OK
         return;
      }

      JBossDestination jbd = (JBossDestination)dest;
      boolean isQueue = jbd.isQueue();
      String name = jbd.getName();

      SecurityManager sm = conn.getSecurityManager();
      SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);

      if (securityMetadata == null)
View Full Code Here

        
         synchronized (temporaryDestinations)
         {
            for(Iterator i = temporaryDestinations.iterator(); i.hasNext(); )
            {
               JBossDestination dest = (JBossDestination)i.next();
  
               if (dest.isQueue())
               {    
                  postOffice.unbindQueue(dest.getName());
                 
                  String counterName =
                     ServerSessionEndpoint.TEMP_QUEUE_MESSAGECOUNTER_PREFIX + dest.getName();
                 
                  MessageCounter counter =
                     serverPeer.getMessageCounterManager().unregisterMessageCounter(counterName);
                 
                  if (counter == null)
View Full Code Here

  
   void sendMessage(JBossMessage msg, Transaction tx, boolean checkForDuplicates) throws Exception
   {
      if (trace) { log.trace(this + " sending " + msg + (tx == null ? " non-transactionally" : " in " + tx)); }

      JBossDestination dest = (JBossDestination)msg.getJMSDestination();
     
      // This allows the no-local consumers to filter out the messages that come from the same
      // connection.

      // TODO Do we want to set this for ALL messages. Optimisation is possible here.
      msg.setConnectionID(id);

      if (checkForDuplicates)
      {
         // Message is already stored... so just ignoring the call
         if (serverPeer.getPersistenceManagerInstance().referenceExists(msg.getMessageID()))
         {
            return;
         }
      }

      // messages arriving over a failed-over connections will be give preferential treatment by
      // routers, which will send them directly to their corresponding failover queues, not to
      // the "local" queues, to reduce clutter and unnecessary "pull policy" revving.
      if (failedNodeID != null)
      {
         msg.putHeader(Message.FAILED_NODE_ID, failedNodeID);
      }

      // We must reference the message *before* we send it the destination to be handled. This is
      // so we can guarantee that the message doesn't disappear from the store before the
      // handling is complete. Each channel then takes copies of the reference if they decide to
      // maintain it internally
     
      MessageReference ref = null;
     
      try
      {        
         ref = ms.reference(msg);
        
         long schedDeliveryTime = msg.getScheduledDeliveryTime();
        
         if (schedDeliveryTime > 0)
         {
            ref.setScheduledDeliveryTime(schedDeliveryTime);
         }
        
         if (dest.isQueue())
         {
            if (!postOffice.route(ref, new JMSCondition(true, dest.getName()), tx))
            {
               throw new JMSException("Failed to route " + ref + " to " + dest.getName());
            }
         }
         else
         {
            postOffice.route(ref, new JMSCondition(false, dest.getName()), tx);  
         }
      }
      finally
      {
         if (ref != null)
View Full Code Here

   {
      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();
     
View Full Code Here

      return m;
   }
  
   protected void setDestination(JBossMessage m, int i) throws JMSException
   {
      JBossDestination dest = null;
      String name =  new GUID().toString();
      if (i % 2 == 0)
      {        
         dest = new JBossQueue(name);
      }
View Full Code Here

      m.setJMSDestination(dest);
   }
  
   protected void setReplyTo(JBossMessage m, int i) throws JMSException
   {
      JBossDestination dest = null;
      String name =  new GUID().toString();
      if (i % 3 == 0)
      {        
         dest = new JBossQueue(name);
      }
View Full Code Here

      JBossMessage msg = (JBossMessage)del.getMessage();
     
      MessageProxy proxy = JBossMessage.
         createThinDelegate(del.getDeliveryId(), (JBossMessage)msg, del.getDeliveryCount());
     
      JBossDestination dest =(JBossDestination) proxy.getJMSDestination();
     
      // If the message received is a direct destination (MessageSucker), and this Consumer is not a MessageSucker.. then we need to replace the destination
      if (dest.isDirect() && !this.consumerDelegate.getDestination().isDirect())
      {
         proxy.setJMSDestination(msg.getOriginalSuckerDestination());
      }
     
      proxy.setSource(cbManager);
View Full Code Here

TOP

Related Classes of org.jboss.jms.destination.JBossDestination

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.