public Registration register() throws ServiceRegistrationException { return endpoint.registerService("txn", new OpenListener() { public void channelOpened(final Channel channel) { getServerForConnection(channel.getConnection()).openChannel(channel); } public void registrationTerminated() { // no operation } }, OptionMap.EMPTY); }
@Override public Registration registerService(String serviceType, OpenListener openListener, OptionMap optionMap) throws ServiceRegistrationException { return this.endpoint.registerService(serviceType, openListener, optionMap); }
public Registration registerService(final String serviceType, final OpenListener openListener, final OptionMap optionMap) throws ServiceRegistrationException { return endpoint.registerService(serviceType, openListener, optionMap); }
public void start() throws IOException { log.trace("start()"); if (stopped) { throw new IOException("Unable to start connector as already stopped."); } // If this ConnectorServer has already started just return. if (started) { return; } log.trace("Registering service"); registration = endpoint.registerService(CHANNEL_NAME, new ChannelOpenListener(), OptionMap.EMPTY); started = true; }
public void start(final Endpoint endpoint) throws IOException { registration = endpoint.registerService(ProtocolUtils.NAMING, new ChannelOpenListener(), OptionMap.EMPTY); }
@Override public void start(StartContext context) throws StartException { final AssociationService associationService = associationServiceInjectedValue.getValue(); final Endpoint endpoint = endpointValue.getValue(); Executor executor = executorService.getOptionalValue(); if (executor != null) { associationService.setExecutor(executor); } RemoteEJBService remoteEJBService = RemoteEJBService.create( associationService.getAssociation(), remotingTransactionServiceInjectedValue.getValue() ); remoteEJBService.serverUp(); // Register an EJB channel open listener OpenListener channelOpenListener = remoteEJBService.getOpenListener(); try { registration = endpoint.registerService(EJB_CHANNEL_NAME, channelOpenListener, this.channelCreationOptions); } catch (ServiceRegistrationException e) { throw new StartException(e); } }
@Override public Registration registerService(String serviceType, OpenListener openListener, OptionMap optionMap) throws ServiceRegistrationException { return this.endpoint.registerService(serviceType, openListener, optionMap); }
public Registration register() throws ServiceRegistrationException { return endpoint.registerService("txn", new OpenListener() { public void channelOpened(final Channel channel) { getServerForConnection(channel.getConnection()).openChannel(channel); } public void registrationTerminated() { // no operation } }, OptionMap.EMPTY); }
public Registration register() throws ServiceRegistrationException { return endpoint.registerService("txn", new OpenListener() { public void channelOpened(final Channel channel) { getServerForConnection(channel.getConnection()).openChannel(channel); } public void registrationTerminated() { // no operation } }, OptionMap.EMPTY); }
public Registration registerService(final String serviceType, final OpenListener openListener, final OptionMap optionMap) throws ServiceRegistrationException { return endpoint.registerService(serviceType, openListener, optionMap); }
public Registration registerService(String s, OpenListener openListener, OptionMap optionMap) throws ServiceRegistrationException { return endpoint.registerService(s, openListener, optionMap); }
public void start(final Endpoint endpoint) throws IOException { registration = endpoint.registerService(Constants.CHANNEL_NAME, new ChannelOpenListener(), OptionMap.EMPTY); }
public void start() throws IOException { log.trace("start()"); if (stopped) { throw new IOException("Unable to start connector as already stopped."); } // If this ConnectorServer has already started just return. if (started) { return; } log.trace("Registering service"); registration = endpoint.registerService(CHANNEL_NAME, new ChannelOpenListener(), OptionMap.EMPTY); started = true; }
public void start() throws IOException { log.trace("start()"); if (stopped) { throw new IOException("Unable to start connector as already stopped."); } // If this ConnectorServer has already started just return. if (started) { return; } log.trace("Registering service"); registration = endpoint.registerService(CHANNEL_NAME, new ChannelOpenListener(), OptionMap.EMPTY); started = true; }
public void start() throws IOException { log.trace("start()"); if (stopped) { throw new IOException("Unable to start connector as already stopped."); } // If this ConnectorServer has already started just return. if (started) { return; } log.trace("Registering service"); registration = endpoint.registerService(CHANNEL_NAME, new ChannelOpenListener(), OptionMap.EMPTY); started = true; }
public void start(final Endpoint endpoint) throws IOException { registration = endpoint.registerService(ProtocolUtils.NAMING, new ChannelOpenListener(), OptionMap.EMPTY); }
public void start(final Endpoint endpoint) throws IOException { registration = endpoint.registerService(ProtocolUtils.NAMING, new ChannelOpenListener(), OptionMap.EMPTY); }
@Override public synchronized void start(StartContext context) throws StartException { try { closed = false; log.debugf("Registering channel listener for %s", channelName); final Registration registration = endpointValue.getValue().registerService(channelName, this, optionMap); // Add to global registry registry.getValue().register(registration); } catch (Exception e) { throw MESSAGES.couldNotStartChanelListener(e); } }
@Override public synchronized void start(StartContext context) throws StartException { try { closed = false; RemotingLogger.ROOT_LOGGER.debugf("Registering channel listener for %s", channelName); final ManagementChannelRegistryService registry = this.registry.getValue(); final Registration registration = endpointValue.getValue().registerService(channelName, this, optionMap); // Add to global registry registry.register(registration); trackerService = registry.getTrackerService(); } catch (Exception e) { throw RemotingLogger.ROOT_LOGGER.couldNotStartChanelListener(e); } }
@Override public void start(StartContext context) throws StartException { // get the remoting server (which allows remoting connector to connect to it) service final ServiceContainer serviceContainer = context.getController().getServiceContainer(); final ServiceController streamServerServiceController = serviceContainer.getRequiredService(this.remotingConnectorServiceName); final AbstractStreamServerService streamServerService = (AbstractStreamServerService) streamServerServiceController.getService(); // we can only work off a remoting connector which is backed by a socket binding if (streamServerService instanceof InjectedSocketBindingStreamServerService) { this.remotingServer = (InjectedSocketBindingStreamServerService) streamServerService; } // Register a EJB channel open listener final OpenListener channelOpenListener = new ChannelOpenListener(serviceContainer); try { registration = endpointValue.getValue().registerService(EJB_CHANNEL_NAME, channelOpenListener, this.channelCreationOptions); } catch (ServiceRegistrationException e) { throw new StartException(e); } // setup a EJBClientTransactionContext backed the transaction manager on this server. // This will be used to propagate the transactions from this server to remote servers during EJB invocations final EJBClientTransactionContext ejbClientTransactionContext = EJBClientTransactionContext.create(this.txManager.getValue(), this.txSyncRegistry.getValue()); EJBClientTransactionContext.setSelector(new ConstantContextSelector<EJBClientTransactionContext>(ejbClientTransactionContext)); }