Methods Summary |
---|
public void | generateEntryContext(java.lang.Object event)
ServerEntryHelper.generateStartUpEntryContext((Boolean) event);
|
public static ServerEntryListener | getServerEntryListener()
return listener;
|
public ServiceGroup | getServiceGroup()
return sg;
|
public static SystemAppLoader | getSystemAppLoader()
return systemAppLoader;
|
protected java.util.List | instantiateRuntimeServices(ServerContext serverContext, java.lang.String[][] defaultServices)
if (onDemandStartup) {
InternalServicesList services = serverContext.getPluggableFeatureFactory().getInternalServicesList();
final InternalServicesList ondemandservices = new OnDemandServices();
final String[][] servicesByName = services.getServicesByName();
final String[][] odsByName = ondemandservices.getServicesByName();
if (servicesByName == null) {
_logger.log(Level.SEVERE, "services.null");
throw new ServerLifecycleException();
}
final List<ServerLifecycle> serviceList = new ArrayList<ServerLifecycle>();
// Instantiate service objects
allServices :
for (final String[] service : servicesByName) {
for (final String[] ods : odsByName) {
if (service[0].equals(ods[0])) {
continue allServices;
}
}
try {
final ServerLifecycle serverLifecycle =
super.instantiateOneServerLifecycle( serverContext, service[1] );
serviceList.add( serverLifecycle );
} catch (Exception ex) {
_logger.log(Level.SEVERE, "server.exception", ex);
throw new ServerLifecycleException(ex.getMessage());
}
}
return serviceList;
} else {
return super.instantiateRuntimeServices( serverContext, defaultServices);
}
|
public static boolean | isOnDemandOff()
return onDemandStartup == false;
|
public static java.nio.channels.SelectionKey | keyFor(java.nio.channels.SelectableChannel channel, java.nio.channels.Selector sel)
if (onDemandStartup == false) {
return channel.keyFor(sel);
}
return ASSocketService.keyFor(channel, sel);
|
public void | onInitialization(ServerContext context)Server is initializing subsystems and setting up the runtime environment.
Prepare for the beginning of active use of the public methods of this
subsystem. This method is called before any of the public methods of
this subsystem are utilized.
listener = new ServerEntryListenerImpl(this);
ServiceGroupBuilder builder = new ServiceGroupBuilder();
sg = builder.buildServiceGroup(this);
// Start the lazy startup framework.
// This will open up network ports and block any incoming connections
// till server startup completes.
try {
super.setServerContext(context);
PluggableFeatureFactory pff = context.getPluggableFeatureFactory();
ASLazyKernel lazyStartupKernel = pff.getASLazyKernel();
onDemandStartup = lazyStartupKernel.startASSocketServices(context) ;
} catch (Exception e) {
onDemandStartup = false;
// Quick startup is not enabled. Start with normal sequence.
}
//ORB is initialized lazily. If this variable is not set,
//Naming code somehow initializes ORB.
com.sun.enterprise.naming.SerialInitContextFactory.
setInitializeOrbManager(false);
super.onInitialization(context);
try {
systemAppLoader = new SystemAppLoader();
} catch (Exception e) {
throw new ServerLifecycleException(e);
}
|
public void | onShutdown()Server is shutting down applications
super.onShutdown();
try {
sg.stop(null);
} catch (Exception e) {
throw new ServerLifecycleException(e);
}
|
public void | onStartup()Server is starting up applications
generateEntryContext(new Boolean(onDemandStartup));
super.onStartup();
|