Package org.jboss.ha.framework.server.lock

Examples of org.jboss.ha.framework.server.lock.SharedLocalYieldingClusterLockManager


         catch (Exception e)
         {
            throw new IllegalStateException("Unexpected exception while starting group communication service for " + channel.getClusterName());
         }
        
         this.lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, this.service, this.service);
        
         try
         {
            this.lockManager.start();
         }
View Full Code Here


         catch (Exception e)
         {
            throw new IllegalStateException("Unexpected exception while starting group communication service for " + channel.getClusterName());
         }
        
         this.lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, this.service, this.service);
        
         try
         {
            this.lockManager.start();
         }
View Full Code Here

   @Override
   public <T extends OutgoingDistributableSessionData> org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T> getDistributedCacheManager(LocalDistributableSessionManager manager)
   {
      Cache<String, Map<Object, Object>> sessionCache = this.cacheSource.getCache(manager);
      SharedLocalYieldingClusterLockManager lockManager = this.lockManagerSource.getLockManager(sessionCache);
      TransactionManager tm = sessionCache.getAdvancedCache().getTransactionManager();
     
      if (!(tm instanceof BatchModeTransactionManager))
      {
         throw new IllegalStateException("Unexpected transaction manager type: " + ((tm != null) ? tm.getClass().getName() : "null"));
View Full Code Here

         catch (Exception e)
         {
            throw new IllegalStateException("Unexpected exception while starting group communication service for " + channel.getClusterName());
         }
        
         this.lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, this.service, this.service);
        
         try
         {
            this.lockManager.start();
         }
View Full Code Here

   {
      String containerName = getContainerName(manager.getReplicationConfig());

      synchronized (lockManagers)
      {
         SharedLocalYieldingClusterLockManager lockManager = lockManagers.get(containerName);
        
         if (lockManager == null)
         {
            EmbeddedCacheManager container = this.registry.getCacheContainer(containerName);           
            String cacheName = getCacheName(manager);
            Cache<Object, Object> cache = container.getCache(cacheName);
            JGroupsTransport transport = (JGroupsTransport) cache.getAdvancedCache().getRpcManager().getTransport();
            Channel channel = transport.getChannel();
           
            CoreGroupCommunicationService gcs = new CoreGroupCommunicationService();
            gcs.setChannel(channel);
            gcs.setScopeId(SCOPE_ID);
           
            try
            {
               gcs.start();
            }
            catch (Exception e)
            {
               throw new IllegalStateException("Unexpected exception while starting group communication service for " + containerName);
            }
           
            lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, gcs, gcs);
           
            try
            {
               lockManager.start();
              
               this.lockManagers.put(containerName, lockManager);
            }
            catch (Exception e)
            {
View Full Code Here

   @Override
   public <T extends OutgoingDistributableSessionData> org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T> getDistributedCacheManager(LocalDistributableSessionManager manager)
   {
      Cache<String, AtomicMap<Object, Object>> cache = this.source.getCache(manager);
      SharedLocalYieldingClusterLockManager lockManager = this.lmSource.getLockManager(manager);
      TransactionManager tm = cache.getAdvancedCache().getTransactionManager();
     
      if (!(tm instanceof BatchModeTransactionManager))
      {
         throw new IllegalStateException("Unexpected transaction manager type: " + ((tm != null) ? tm.getClass().getName() : "null"));
View Full Code Here

      EmbeddedCacheManager container = (EmbeddedCacheManager) cache.getCacheManager();
      String clusterName = container.getGlobalConfiguration().getClusterName();
     
      synchronized (this.lockManagers)
      {
         SharedLocalYieldingClusterLockManager lockManager = this.lockManagers.get(clusterName);
        
         if (lockManager == null)
         {
            JGroupsTransport transport = (JGroupsTransport) cache.getAdvancedCache().getRpcManager().getTransport();
            Channel channel = transport.getChannel();
           
            CoreGroupCommunicationService gcs = new CoreGroupCommunicationService();
            gcs.setChannel(channel);
            gcs.setScopeId(SCOPE_ID);
           
            try
            {
               gcs.start();
            }
            catch (Exception e)
            {
               throw new IllegalStateException("Unexpected exception while starting group communication service for " + clusterName);
            }
           
            lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, gcs, gcs);
           
            try
            {
               lockManager.start();
            }
            catch (Exception e)
            {
               gcs.stop();
               throw new IllegalStateException("Unexpected exception while starting lock manager for " + clusterName);
View Full Code Here

   @Override
   public <T extends OutgoingDistributableSessionData> org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T> getDistributedCacheManager(LocalDistributableSessionManager manager)
   {
      Cache<String, Map<Object, Object>> sessionCache = this.cacheSource.getCache(manager);
      SharedLocalYieldingClusterLockManager lockManager = this.lockManagerSource.getLockManager(sessionCache);
      TransactionManager tm = sessionCache.getAdvancedCache().getTransactionManager();
     
      if (!(tm instanceof BatchModeTransactionManager))
      {
         throw new IllegalStateException("Unexpected transaction manager type: " + ((tm != null) ? tm.getClass().getName() : "null"));
View Full Code Here

   @Override
   public <T extends OutgoingDistributableSessionData> org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T> getDistributedCacheManager(LocalDistributableSessionManager manager)
   {
      Cache<?, ?> cache = this.cacheSource.getCache(manager);
      SharedLocalYieldingClusterLockManager lockManager = this.lockManagerSource.getLockManager(cache);
      TransactionManager tm = cache.getAdvancedCache().getTransactionManager();
     
      if (!(tm instanceof BatchModeTransactionManager))
      {
         throw new IllegalStateException("Unexpected transaction manager type: " + ((tm != null) ? tm.getClass().getName() : "null"));
View Full Code Here

      EmbeddedCacheManager container = (EmbeddedCacheManager) cache.getCacheManager();
      String clusterName = container.getGlobalConfiguration().getClusterName();
     
      synchronized (this.lockManagers)
      {
         SharedLocalYieldingClusterLockManager lockManager = this.lockManagers.get(clusterName);
        
         if (lockManager == null)
         {
            JGroupsTransport transport = (JGroupsTransport) cache.getAdvancedCache().getRpcManager().getTransport();
            Channel channel = transport.getChannel();
           
            CoreGroupCommunicationService gcs = new CoreGroupCommunicationService();
            gcs.setChannel(channel);
            gcs.setScopeId(SCOPE_ID);
           
            try
            {
               gcs.start();
            }
            catch (Exception e)
            {
               throw new IllegalStateException("Unexpected exception while starting group communication service for " + clusterName);
            }
           
            lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, gcs, gcs);
           
            try
            {
               lockManager.start();
            }
            catch (Exception e)
            {
               gcs.stop();
               throw new IllegalStateException("Unexpected exception while starting lock manager for " + clusterName);
View Full Code Here

TOP

Related Classes of org.jboss.ha.framework.server.lock.SharedLocalYieldingClusterLockManager

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.