Examples of JGroupsTransport


Examples of org.jboss.jca.core.workmanager.transport.remote.jgroups.JGroupsTransport

    @Override
    public void start(StartContext context) throws StartException {
        ROOT_LOGGER.debugf("Starting JCA DistributedWorkManager: ", value.getName());

        JGroupsTransport transport = new JGroupsTransport();
        try {
            transport.setChannel((JChannel) jGroupsChannelFactory.getValue().createChannel(jgroupsChannelName));

            if (jgroupsChannelName != null)
                transport.setClusterName(jgroupsChannelName);

            if (requestTimeout != null)
                transport.setTimeout(requestTimeout);

            this.value.setTransport(transport);
        } catch (Exception e) {
            ROOT_LOGGER.trace("failed to start JGroups channel", e);
            throw ROOT_LOGGER.failedToStartJGroupsChannel(jgroupsChannelName, this.value.getName());
        }

        BlockingExecutor longRunning = (BlockingExecutor) executorLong.getOptionalValue();
        if (longRunning != null) {
            this.value.setLongRunningThreadPool(longRunning);
            this.value.setShortRunningThreadPool((BlockingExecutor) executorShort.getValue());
        } else {
            this.value.setLongRunningThreadPool((BlockingExecutor) executorShort.getValue());
            this.value.setShortRunningThreadPool((BlockingExecutor) executorShort.getValue());

        }

        this.value.setXATerminator(new XATerminatorImpl(xaTerminator.getValue()));

        WorkManagerCoordinator.getInstance().registerWorkManager(value);

        try {
            transport.startup();
        } catch (Throwable throwable) {
            ROOT_LOGGER.trace("failed to start DWM transport:", throwable);
            throw ROOT_LOGGER.failedToStartDWMTransport(this.value.getName());
        }
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.