Examples of ChannelFactory


Examples of org.jboss.as.clustering.jgroups.ChannelFactory

            if (channelFactoryServiceController.getState() != ServiceController.State.UP) {
                // need to start the controller and wait for it to start
                return null ;
            }
            ChannelFactory factory = ChannelFactory.class.cast(channelFactoryServiceController.getValue());

            return factory ;
        }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.ChannelFactory

        ServiceName serviceName = ChannelFactoryService.getServiceName(stackName);
        try {
            ServiceController<?> controller = registry.getRequiredService(serviceName);
            controller.setMode(ServiceController.Mode.ACTIVE);
            try {
                ChannelFactory factory = ServiceContainerHelper.getValue(controller, ChannelFactory.class);
                // Create a temporary channel, but don't connect it
                Channel channel = factory.createChannel(UUID.randomUUID().toString());
                try {
                    // ProtocolStack.printProtocolSpecAsXML() is very hacky and only works on an uninitialized stack
                    List<Protocol> protocols = channel.getProtocolStack().getProtocols();
                    Collections.reverse(protocols);
                    ProtocolStack stack = new ProtocolStack();
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.ChannelFactory

     * {@inheritDoc}
     * @see org.infinispan.remoting.transport.jgroups.JGroupsChannelLookup#getJGroupsChannel(java.util.Properties)
     */
    @Override
    public Channel getJGroupsChannel(Properties properties) {
        ChannelFactory factory = (ChannelFactory) properties.get(CHANNEL_FACTORY);

        if (factory == null) {
            throw new IllegalStateException(String.format("No %s property was specified within the transport properties: %s", CHANNEL_FACTORY, properties));
        }

        try {
            return factory.createChannel();
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new IllegalArgumentException(e);
        }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.ChannelFactory

                final List<BroadcastGroupConfiguration> newConfigs = new ArrayList<BroadcastGroupConfiguration>();
                for(final BroadcastGroupConfiguration config : broadcastGroups) {
                    final String name = config.getName();
                    final String key = "broadcast" + name;
                    if (jgroupFactories.containsKey(key)) {
                        ChannelFactory channelFactory = jgroupFactories.get(key);
                        String channelName = jgroupsChannels.get(key);
                        JChannel channel = (JChannel) channelFactory.createChannel(channelName);
                        channels.put(channelName, channel);
                        newConfigs.add(BroadcastGroupAdd.createBroadcastGroupConfiguration(name, config, channel, channelName));
                    } else {
                        final SocketBinding binding = groupBindings.get(key);
                        if (binding == null) {
                            throw MessagingLogger.ROOT_LOGGER.failedToFindBroadcastSocketBinding(name);
                        }
                       newConfigs.add(BroadcastGroupAdd.createBroadcastGroupConfiguration(name, config, binding));
                    }
                }
                configuration.getBroadcastGroupConfigurations().clear();
                configuration.getBroadcastGroupConfigurations().addAll(newConfigs);
            }
            if(discoveryGroups != null) {
                configuration.setDiscoveryGroupConfigurations(new HashMap<String, DiscoveryGroupConfiguration>());
                for(final Map.Entry<String, DiscoveryGroupConfiguration> entry : discoveryGroups.entrySet()) {
                    final String name = entry.getKey();
                    final String key = "discovery" + name;
                    DiscoveryGroupConfiguration config = null;
                    if (jgroupFactories.containsKey(key)) {
                        ChannelFactory channelFactory = jgroupFactories.get(key);
                        String channelName = jgroupsChannels.get(key);
                        JChannel channel = channels.get(channelName);
                        if (channel == null) {
                            channel = (JChannel) channelFactory.createChannel(key);
                            channels.put(channelName, channel);
                        }
                        config = DiscoveryGroupAdd.createDiscoveryGroupConfiguration(name, entry.getValue(), channel, channelName);
                    } else {
                        final SocketBinding binding = groupBindings.get(key);
View Full Code Here

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

                 
         FilterFactory ff = new SelectorFactory();
        
         if (clustered)
         {       
            ChannelFactory jChannelFactory = null;

           if (channelFactoryName != null)
            {
               Object info = null;
               try
View Full Code Here

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

      String configFilePath = sc.getPersistenceConfigFile(true);

      // TODO (ovidiu) we're temporarily ignoring the multiplex option, it doesn't work well
      boolean ignoreMultiplexer = true;
      ChannelFactory jChannelFactory =
         new ClusteredPersistenceServiceConfigFileJChannelFactory(configFilePath,
                                                                  ignoreMultiplexer,
                                                                  sc.getMBeanServer());
     
      MessagingPostOffice postOffice =
View Full Code Here

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

                 
         FilterFactory ff = new SelectorFactory();
        
         if (clustered)
         {       
            ChannelFactory jChannelFactory = null;

           if (channelFactoryName != null)
            {
               Object info = null;
               try
View Full Code Here

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

      String configFilePath = sc.getPersistenceConfigFile(true);

      // TODO (ovidiu) we're temporarily ignoring the multiplex option, it doesn't work well
      boolean ignoreMultiplexer = true;
      ChannelFactory jChannelFactory =
         new ClusteredPersistenceServiceConfigFileJChannelFactory(configFilePath,
                                                                  ignoreMultiplexer,
                                                                  sc.getMBeanServer());

      MessagingPostOffice postOffice =
View Full Code Here

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

                 
         FilterFactory ff = new SelectorFactory();
        
         if (clustered)
         {       
            ChannelFactory jChannelFactory = null;

           if (channelFactoryName != null)
            {
               Object info = null;
               try
View Full Code Here

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

      // we're testing with JGroups stack configurations we're shipping with the release

      String configFilePath = sc.getPersistenceConfigFile(true);


      ChannelFactory jChannelFactory =
         new ClusteredPersistenceServiceConfigFileJChannelFactory(configFilePath, sc.getMBeanServer(), nodeID);

      MessagingPostOffice postOffice =
         new MessagingPostOffice(sc.getDataSource(), sc.getTransactionManager(),
                                 sc.getPostOfficeSQLProperties(), true, nodeID,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.