throws Exception
{
super(properties, systemRegistry, txnProxy, logger);
logger.log(Level.CONFIG, "Creating ChannelServiceImpl");
PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);
try {
synchronized (ChannelServiceImpl.class) {
if (contextMap == null) {
contextMap = new TransactionContextMap<Context>(txnProxy);
}
if (collectionsFactory == null) {
collectionsFactory =
systemRegistry.getComponent(
BindingKeyedCollections.class);
}
if (channelServerMap == null) {
channelServerMap =
collectionsFactory.newMap(CHANNEL_SERVER_MAP_PREFIX);
}
}
contextFactory = new ContextFactory(contextMap);
WatchdogService watchdogService =
txnProxy.getService(WatchdogService.class);
sessionService = txnProxy.getService(ClientSessionService.class);
localNodeId =
txnProxy.getService(DataService.class).getLocalNodeId();
/*
* Get the properties for controlling write buffer size,
* channel event processing, and session relocation timeout
*/
writeBufferSize = wrappedProps.getIntProperty(
WRITE_BUFFER_SIZE_PROPERTY, DEFAULT_WRITE_BUFFER_SIZE,
8192, Integer.MAX_VALUE);
eventsPerTxn = wrappedProps.getIntProperty(
EVENTS_PER_TXN_PROPERTY, DEFAULT_EVENTS_PER_TXN,
1, Integer.MAX_VALUE);
sessionRelocationTimeout = wrappedProps.getLongProperty(
StandardProperties.SESSION_RELOCATION_TIMEOUT_PROPERTY,
StandardProperties.DEFAULT_SESSION_RELOCATION_TIMEOUT,
500, Long.MAX_VALUE);
/*
* Export the ChannelServer.
*/
int serverPort = wrappedProps.getIntProperty(
SERVER_PORT_PROPERTY, DEFAULT_SERVER_PORT, 0, 65535);
serverImpl = new ChannelServerImpl();
exporter = new Exporter<ChannelServer>(ChannelServer.class);
try {
int port = exporter.export(serverImpl, serverPort);