Package org.jboss.jms.server.endpoint

Examples of org.jboss.jms.server.endpoint.ServerSessionEndpoint


     
      // read permission required on the destination
      Destination dest = (Destination)mi.getArguments()[0];
     
      SessionAdvised del = (SessionAdvised)invocation.getTargetObject();
      ServerSessionEndpoint sess = (ServerSessionEndpoint)del.getEndpoint();
     
      check(dest, CheckType.READ, sess.getConnectionEndpoint());
     
      // if creating a durable subscription then need create permission
     
      String subscriptionName = (String)mi.getArguments()[3];
      if (subscriptionName != null)
      {
         // durable
         check(dest, CheckType.CREATE, sess.getConnectionEndpoint());
      }
     
      return invocation.invokeNext();
   }  
View Full Code Here


      MethodInvocation mi = (MethodInvocation)invocation;
     
      Destination dest = (Destination)mi.getArguments()[0];
     
      SessionAdvised del = (SessionAdvised)invocation.getTargetObject();
      ServerSessionEndpoint sess = (ServerSessionEndpoint)del.getEndpoint();
                 
      check(dest, CheckType.READ, sess.getConnectionEndpoint());
     
      return invocation.invokeNext();
   }
View Full Code Here

     
      Message m = (Message)mi.getArguments()[0];
      Destination dest = m.getJMSDestination();

      SessionAdvised del = (SessionAdvised)invocation.getTargetObject();
      ServerSessionEndpoint se = (ServerSessionEndpoint)del.getEndpoint();
      ServerConnectionEndpoint ce = se.getConnectionEndpoint();
                       
      check(dest, CheckType.WRITE, ce);
           
      return invocation.invokeNext();
   }  
View Full Code Here

         return endpoint.getServerPeer();
      }
      else if (obj instanceof SessionAdvised)
      {
         SessionAdvised adv = (SessionAdvised) obj;
         ServerSessionEndpoint endpoint = (ServerSessionEndpoint)adv.getEndpoint();
         return endpoint.getConnectionEndpoint().getServerPeer();
      }
      else if (obj instanceof ConnectionFactoryAdvised)
      {
         ConnectionFactoryAdvised adv = (ConnectionFactoryAdvised) obj;
         ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)adv.getEndpoint();
         return endpoint.getServerPeer();
      }
      else
      {
         throw new IllegalStateException("PoisonInterceptor doesn't support " +
            obj.getClass().getName() +
View Full Code Here

   public void handleReplicateDeliveryAck(String sessionID, final long deliveryID) throws Exception
   {
     if (trace) { log.trace(this + " handleReplicateDeliveryAck " + sessionID + " " + deliveryID); }
        
     //TODO - this does not belong here
     final ServerSessionEndpoint session = serverPeer.getSession(sessionID);
    
      if (this.useJGroupsWorkaround)
      {
         replicateSemaphore.release();
      }
    
     if (session == null)
     {
       log.warn("Cannot find session " + sessionID);
      
       return;
     }         
    
      //Execute on a different thread to avoid taking up JGroups thread for too long
      //which can cause heartbeats to be missed and the member to be suspected
     
      replicateResponseExecutor.execute(
            new Runnable()
            {
               public void run()
               {
                  try
                  {
                     session.replicateDeliveryResponseReceived(deliveryID);
                  }
                  catch (Exception e)
                  {
                     log.error("Failed to process response", e);
                  }
View Full Code Here

         
          Iterator iter2 = sessions.iterator();
         
          while (iter2.hasNext())
          {
            ServerSessionEndpoint session = (ServerSessionEndpoint)iter2.next();
           
            session.deliverAnyWaitingDeliveries(null);
           
            session.collectDeliveries(deliveries, firstNode, null);                       
          }            
         
          if (!firstNode)
          {     
             PostOfficeAddressInfo info = (PostOfficeAddressInfo)nodeIDAddressMap.get(new Integer(failoverNodeID));
View Full Code Here

           
            boolean gotSome = false;
           
            while (iter.hasNext())
            {
              ServerSessionEndpoint session = (ServerSessionEndpoint)iter.next();
             
              session.deliverAnyWaitingDeliveries(queueName);
             
              if (session.collectDeliveries(dels, firstNode, queueName))
              {
                gotSome = true;
              }             
            }            
           
View Full Code Here

   public void handleReplicateDeliveryAck(String sessionID, final long deliveryID) throws Exception
   {
     if (trace) { log.trace(this + " handleReplicateDeliveryAck " + sessionID + " " + deliveryID); }
        
     //TODO - this does not belong here
     final ServerSessionEndpoint session = serverPeer.getSession(sessionID);
    
      if (this.useJGroupsWorkaround)
      {
         replicateSemaphore.release();
      }
    
     if (session == null)
     {
       log.warn("Cannot find session " + sessionID);
      
       return;
     }         
    
      //Execute on a different thread to avoid taking up JGroups thread for too long
      //which can cause heartbeats to be missed and the member to be suspected
     
      replicateResponseExecutor.execute(
            new Runnable()
            {
               public void run()
               {
                  try
                  {
                     session.replicateDeliveryResponseReceived(deliveryID);
                  }
                  catch (Exception e)
                  {
                     log.error("Failed to process response", e);
                  }
View Full Code Here

         
          Iterator iter2 = sessions.iterator();
         
          while (iter2.hasNext())
          {
            ServerSessionEndpoint session = (ServerSessionEndpoint)iter2.next();
           
            session.deliverAnyWaitingDeliveries(null);
           
            session.collectDeliveries(deliveries, firstNode, null);                       
          }            
         
          if (!firstNode)
          {     
             PostOfficeAddressInfo info = (PostOfficeAddressInfo)nodeIDAddressMap.get(new Integer(failoverNodeID));
View Full Code Here

           
            boolean gotSome = false;
           
            while (iter.hasNext())
            {
              ServerSessionEndpoint session = (ServerSessionEndpoint)iter.next();
             
              session.deliverAnyWaitingDeliveries(queueName);
             
              if (session.collectDeliveries(dels, firstNode, queueName))
              {
                gotSome = true;
              }             
            }            
           
View Full Code Here

TOP

Related Classes of org.jboss.jms.server.endpoint.ServerSessionEndpoint

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.