// Get activation specific configuration items, if activated
if (activationID != null) {
ProxyPreparer activationSystemPreparer =
(ProxyPreparer) Config.getNonNullEntry(config,
MERCURY, "activationSystemPreparer",
ProxyPreparer.class, new BasicProxyPreparer());
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "activationSystemPreparer: {0}",
activationSystemPreparer);
}
activationSystem =
(ActivationSystem) activationSystemPreparer.prepareProxy(
ActivationGroup.getSystem());
if (initLogger.isLoggable(Level.FINEST)) {
initLogger.log(Level.FINEST, "Prepared activation system is: {0}",
activationSystem);
}
ProxyPreparer activationIdPreparer =
(ProxyPreparer) Config.getNonNullEntry(config,
MERCURY, "activationIdPreparer",
ProxyPreparer.class, new BasicProxyPreparer());
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "activationIdPreparer: {0}",
activationIdPreparer);
}
activationID = (ActivationID) activationIdPreparer.prepareProxy(
activationID);
if (initLogger.isLoggable(Level.FINEST)) {
initLogger.log(Level.FINEST, "Prepared activationID is: {0}",
activationID);
}
activationPrepared = true;
exporter = (Exporter)Config.getNonNullEntry(config,
MERCURY, "serverExporter", Exporter.class,
new ActivationExporter(
activationID,
new BasicJeriExporter(
TcpServerEndpoint.getInstance(0),
new BasicILFactory(), false, true)),
activationID);
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "Activatable service exporter is: {0}",
exporter);
}
} else { //Get non-activatable configuration items
exporter = (Exporter) Config.getNonNullEntry(config,
MERCURY, "serverExporter", Exporter.class,
new BasicJeriExporter(
TcpServerEndpoint.getInstance(0),
new BasicILFactory(), false, true));
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG,
"Non-activatable service exporter is: {0}", exporter);
}
}
listenerPreparer = (ProxyPreparer) Config.getNonNullEntry(
config, MERCURY, "listenerPreparer", ProxyPreparer.class,
new BasicProxyPreparer());
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "Listener preparer is: {0}",
listenerPreparer);
}
/* Get the proxy preparers for the lookup locators to join */
locatorToJoinPreparer = (ProxyPreparer)Config.getNonNullEntry
(config, MERCURY, "locatorToJoinPreparer",
ProxyPreparer.class, new BasicProxyPreparer());
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "Locator preparer is: {0}",
locatorToJoinPreparer);
}
// Create lease policy -- used by recovery logic, below
leasePolicy = (LeasePeriodPolicy) Config.getNonNullEntry(config,
MERCURY, "leasePeriodPolicy", LeasePeriodPolicy.class,
new FixedLeasePeriodPolicy(3 * HOURS, 1 * HOURS));
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "LeasePeriodPolicy is: {0}",
leasePolicy);
}
// Note: referenced by recovery logic in rebuildTransientState()
ProxyPreparer recoveredListenerPreparer = null;
if (persistent) {
persistenceDirectory =
(String)Config.getNonNullEntry(
config, MERCURY, "persistenceDirectory", String.class);
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "Persistence directory is: {0}",
persistenceDirectory);
}
// Note: referenced by recovery logic in rebuildTransientState()
recoveredListenerPreparer =
(ProxyPreparer) Config.getNonNullEntry(
config, MERCURY, "recoveredListenerPreparer", ProxyPreparer.class,
new BasicProxyPreparer());
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "Recovered listener preparer is: {0}",
recoveredListenerPreparer);
}
// Note: referenced by recovery logic, below
recoveredLocatorToJoinPreparer = (ProxyPreparer)Config.getNonNullEntry
(config, MERCURY, "recoveredLocatorToJoinPreparer",
ProxyPreparer.class, new BasicProxyPreparer());
if (initLogger.isLoggable(Level.CONFIG)) {
initLogger.log(Level.CONFIG, "Recovered locator preparer is: {0}",
recoveredLocatorToJoinPreparer);
}