Package org.jboss.cache.config

Examples of org.jboss.cache.config.RuntimeConfig


   private JChannel getMultiplexerChannel() throws CacheException
   {
      String stackName = configuration.getMultiplexerStack();

      RuntimeConfig rtc = configuration.getRuntimeConfig();
      ChannelFactory channelFactory = rtc.getMuxChannelFactory();
      JChannel muxchannel = null;

      if (channelFactory != null)
      {
         try
View Full Code Here


   // --------------------------------------------------------  Private methods

   private void injectMuxChannel() throws CacheException
   {
      Configuration cfg = getConfiguration();
      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
         {
            throw new CacheException("Exception creating multiplexed channel", e);
         }
         rtcfg.setChannel(ch);
      }
   }
View Full Code Here

      return base + ":" + attributesBase + configName;
   }
  
   private void configureMuxUpHandlerChannel(Cache<?, ?> cache) throws Exception
   {
      RuntimeConfig rc = cache.getConfiguration().getRuntimeConfig();
      Channel channel = rc.getChannel();
     
         if (channel == null)     
         {
            // TODO we could deal with other JBC mechanisms of configuring Channels, but in
            // reality the AS use cases that want MuxUpHandler shouldn't configure their
            // JBC that way
            ChannelFactory cf = rc.getMuxChannelFactory();
            if (cf == null)
            {
               log.debug("Cache " + cache.getConfiguration().getClusterName() +
                     " does not have a ChannelFactory injected so MuxUpHandler cannot be integrated");
            }
            String stack = cache.getConfiguration().getMuxStackName();
            if (stack == null)
            {
               log.debug("Cache " + cache.getConfiguration().getClusterName() +
                     " does not have a MuxStackName configured so MuxUpHandler cannot be integrated");
            }
            if (cf != null && stack != null)
            {
               // This doesn't result in JMX reg of channel              
               //channel = cf.createChannel(stack);
               channel = cf.createMultiplexerChannel(stack, cache.getConfiguration().getClusterName());
               rc.setChannel(new MuxHandlerChannel((JChannel) channel));
            }
         }
         else if (channel.getUpHandler() == null)
         {
            // replace
            rc.setChannel(new MuxHandlerChannel((JChannel) channel));
         }
         // else the Channel was injected and already had a handler -- shouldn't happen
   }
View Full Code Here

   }

   private void injectMuxChannel() throws CacheException
   {
      Configuration cfg = getConfiguration();
      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() != null && rtcfg.getChannel() != null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
         {
            throw new CacheException("Exception creating multiplexed channel", e);
         }
         rtcfg.setChannel(ch);
      }

   }
View Full Code Here

   // --------------------------------------------------------  Private methods

   private void injectMuxChannel() throws CacheException
   {
      Configuration cfg = getConfiguration();
      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
         {
            throw new CacheException("Exception creating multiplexed channel", e);
         }
         rtcfg.setChannel(ch);
      }
   }
View Full Code Here

   // --------------------------------------------------------  Private methods

   private void injectMuxChannel() throws CacheException
   {
      Configuration cfg = getConfiguration();
      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
         {
            throw new CacheException("Exception creating multiplexed channel", e);
         }
         rtcfg.setChannel(ch);
      }
   }
View Full Code Here

   private JChannel getMultiplexerChannel() throws CacheException
   {
      String stackName = configuration.getMultiplexerStack();

      RuntimeConfig rtc = configuration.getRuntimeConfig();
      ChannelFactory channelFactory = rtc.getMuxChannelFactory();
      JChannel muxchannel = null;

      if (channelFactory != null)
      {
         try
View Full Code Here

   // --------------------------------------------------------  Private methods

   private void injectMuxChannel() throws CacheException
   {
      Configuration cfg = getConfiguration();
      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
         {
            throw new CacheException("Exception creating multiplexed channel", e);
         }
         rtcfg.setChannel(ch);
      }
   }
View Full Code Here

   private JChannel getMultiplexerChannel() throws CacheException
   {
      String stackName = configuration.getMultiplexerStack();

      RuntimeConfig rtc = configuration.getRuntimeConfig();
      ChannelFactory channelFactory = rtc.getMuxChannelFactory();
      JChannel muxchannel = null;

      if (channelFactory != null)
      {
         try
View Full Code Here

   // --------------------------------------------------------  Private methods

   private void injectMuxChannel() throws CacheException
   {
      Configuration cfg = getConfiguration();
      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
         {
            throw new CacheException("Exception creating multiplexed channel", e);
         }
         rtcfg.setChannel(ch);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.config.RuntimeConfig

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.