descCreated = true;
}
// Get prepared activation system reference
Created created = null;
ActivationSystem sys =
ServiceStarter.getActivationSystem(
getActivationSystemHost(),
getActivationSystemPort(),
config);
ProxyPreparer activationIDPreparer =
(ProxyPreparer) Config.getNonNullEntry(config,
ServiceStarter.START_PACKAGE, "activationIdPreparer",
ProxyPreparer.class, new BasicProxyPreparer());
if (innerProxyPreparer == null) {
innerProxyPreparer = globalServicePreparer;
}
/* Warn user of inaccessible codebase(s) */
HTTPDStatus.httpdWarning(getExportCodebase());
ActivationGroupID gid = null;
ActivationID aid = null;
Object proxy = null;
try {
/* Create the ActivateWrapper descriptor for the desired service */
MarshalledObject params =
new MarshalledObject(getServerConfigArgs());
ActivateWrapper.ActivateDesc adesc =
new ActivateWrapper.ActivateDesc(
getImplClassName(),
ClassLoaderUtil.getImportCodebaseURLs(getImportCodebase()),
ClassLoaderUtil.getCodebaseURLs(getExportCodebase()),
getPolicy(),
params);
logger.finest("ActivateDesc: " + adesc);
// Get hosting activation group
gid = SharedActivationGroupDescriptor.restoreGroupID(
getSharedGroupLog());
/* Register the desired service with the activation system */
aid = ActivateWrapper.register(
gid, adesc, getRestart(), sys);
aid = (ActivationID) activationIDPreparer.prepareProxy(aid);
proxy = aid.activate(true);
if(proxy != null) {
proxy = innerProxyPreparer.prepareProxy(proxy);
if (proxy instanceof ServiceProxyAccessor) {
proxy = ((ServiceProxyAccessor)proxy).getServiceProxy();
if(proxy != null) {
proxy = getServicePreparer().prepareProxy(proxy);
} else {
logger.log(Level.FINE,
"Service's getServiceProxy() returned null");
}
}
}//endif
} catch(Exception e) {
try {
if (aid != null) sys.unregisterObject(aid);
} catch (Exception ee) {
// ignore -- did the best we could.
logger.log(Level.FINEST,
"Unable to unregister with activation system", ee);
}