|
Protomatter Classes v1.1.6 | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
PASShutdown | Objects implementing this interface and listed in the configuration file for PAS are run when PAS is shutting down. |
PASStartup | Objects implementing this interface and listed in the configuration file for PAS are started when PAS is started. |
Exception Summary | |
ShutdownException | An exception generated while an implementation of the PASShutdown interface was shutting down. |
StartupException | An exception generated while an implementation of the PASStartup interface was starting. |
Interfaces for the PAS startup/shutdown facilities.
The behavior is identical for both. The argument "name" is the virtual name that the startup/shutdown class was given in the properties file for PAS. Virtual names are used so that you can have the same class run with multiple configurations.package com.protomatter.init; public interface PASStartup { public String startup(String name, Properties pasProps, Properties myProps, Context context) throws StartupException; } public interface PASShutdown { public String shutdown(String name, Properties pasProps, Properties myProps, Context context) throws ShutdownException; }
These classes are defined in the PAS properties file as follows:
The variable "pasProps" is the entire PAS properties file, and the variable "myProps" is the key/value pairs specified as the startupArgs or shutdownArgs for the class. The "context" variable is a javax.naming.Context object that is connected to the PAS JNDI tree.pas.startupClass.NAME = classname pas.startupArgs.NAME = key1=val1,key2=val2,key3=val3,... pas.shutdownClass.NAME = classname pas.shutdownArgs.NAME = key1=val1,key2=val2,key3=val3,...
You can also specify the order of startup and shutdown classes if there's a need for ordering. To do this, simply put the following in your PAS properties file:
pas.startupClass> = NAME1,NAME2,...,NAMEn, pas.shutdownClass = NAME1,NAME2,...,NAMEn,
This specified an optional list of "virtual names" of services to start and/or stop in a given order. Other services not listed here, but specified using the pas.startupClass.NAME and pas.shutdownClass.NAME are run after any whose order is specified.
|
Protomatter Classes v1.1.6 Copyright 1998-2001 Nate Sammons |
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Protomatter Classes v1.1.6 | http://protomatter.sourceforge.net/1.1.6 |