Package org.jboss.messaging.core.contract

Examples of org.jboss.messaging.core.contract.Replicator


          
           if (queue.isClustered() && postOffice.isClustered())
            {
              //Clustered durable sub consumer created - we need to remove this info from the replicator
             
              Replicator rep = (Replicator)postOffice;
             
              rep.remove(queue.getName());
            }
         }
      }

   }
View Full Code Here


        //This is also used to prevent a possible race condition where a clustered durable sub is bound on all nodes
        //but then unsubscribed before the bind is complete on all nodes, leaving it bound on some nodes and not on others
        //The bind all is synchronous so by the time we add the x to the replicator we know it is bound on all nodes
        //and same to unsubscribe
       
        Replicator rep = (Replicator)postOffice;
       
        rep.put(queue.getName(), DUR_SUB_STATE_CONSUMERS);
      }
     
      ConsumerAdvised advised;
     
      // Need to synchronized to prevent a deadlock
View Full Code Here

/*      */     {
/* 1287 */       this.postOffice = ((PostOffice)JMXAccessor.getJMXAttributeOverSecurity(getServer(), this.postOfficeObjectName, "Instance"));
/*      */
/* 1292 */       if (this.postOffice.isClustered())
/*      */       {
/* 1294 */         Replicator rep = (Replicator)this.postOffice;
/*      */
/* 1296 */         this.connFactoryJNDIMapper.injectReplicator(rep);
/*      */
/* 1300 */         this.clusterConnectionManager.injectPostOffice(this.postOffice);
/*      */
View Full Code Here

/*  825 */         throw new IllegalStateException("Cannot unsubscribe durable subscription " + subscriptionName + " since it has active subscribers");
/*      */       }
/*      */
/*  831 */       if ((sub.isClustered()) && (this.postOffice.isClustered()))
/*      */       {
/*  833 */         Replicator rep = (Replicator)this.postOffice;
/*      */
/*  835 */         Map map = rep.get(sub.getName());
/*      */
/*  837 */         if (!map.isEmpty())
/*      */         {
/*  839 */           throw new IllegalStateException("Cannot unsubscribe durable subscription " + subscriptionName + " since it has active subscribers on other nodes");
/*      */         }
View Full Code Here

/*      */
/* 2122 */     ServerConsumerEndpoint ep = new ServerConsumerEndpoint(consumerID, queue, queue.getName(), this, selectorString, noLocal, jmsDestination, dlqToUse, expiryQueueToUse, redeliveryDelayToUse, maxDeliveryAttemptsToUse, false, replicating);
/*      */
/* 2128 */     if ((queue.isClustered()) && (this.postOffice.isClustered()) && (jmsDestination.isTopic()) && (subscriptionName != null))
/*      */     {
/* 2137 */       Replicator rep = (Replicator)this.postOffice;
/*      */
/* 2139 */       rep.put(queue.getName(), "C");
/*      */     }
/*      */     ConsumerAdvised advised;
/* 2146 */     synchronized (AspectManager.instance())
/*      */     {
/* 2148 */       advised = new ConsumerAdvised(ep);
View Full Code Here

/*     */         }
/*     */
/*     */       }
/* 550 */       else if ((queue.isClustered()) && (postOffice.isClustered()))
/*     */       {
/* 554 */         Replicator rep = (Replicator)postOffice;
/*     */
/* 556 */         rep.remove(queue.getName());
/*     */       }
/*     */     }
/*     */   }
View Full Code Here

         // a bit messy but we have a circular dependency POJOContainer should be able to help us
         // here. Yes, this is nasty.

         if (postOffice.isClustered())
         {
            Replicator rep = (Replicator)postOffice;
           
            connFactoryJNDIMapper.injectReplicator(rep);         
           
            // Also inject into the cluster connection manager
           
View Full Code Here

        
         //Also if it is clustered we must disallow unsubscribing if it has active consumers on other nodes
        
         if (sub.isClustered() && postOffice.isClustered())
         {
           Replicator rep = (Replicator)postOffice;
          
           Map map = rep.get(sub.getName());
          
           if (!map.isEmpty())
           {
             throw new IllegalStateException("Cannot unsubscribe durable subscription " +
                     subscriptionName + " since it has active subscribers on other nodes");
View Full Code Here

        //This is also used to prevent a possible race condition where a clustered durable sub is bound on all nodes
        //but then unsubscribed before the bind is complete on all nodes, leaving it bound on some nodes and not on others
        //The bind all is synchronous so by the time we add the x to the replicator we know it is bound on all nodes
        //and same to unsubscribe
       
        Replicator rep = (Replicator)postOffice;
       
        rep.put(queue.getName(), DUR_SUB_STATE_CONSUMERS);
      }
     
      ConsumerAdvised advised;
     
      // Need to synchronized to prevent a deadlock
View Full Code Here

          
           if (queue.isClustered() && postOffice.isClustered())
            {
              //Clustered durable sub consumer created - we need to remove this info from the replicator
             
              Replicator rep = (Replicator)postOffice;
             
              rep.remove(queue.getName());
            }
         }
      }

   }
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.contract.Replicator

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.