Author: | Unspecified |
Home Page: | |
Version: | Unspecified |
Release Tag: | Unknown |
Release Date: | Unknown |
JVM Required: | Unspecified |
License: | GNU Library General Public License |
Categories: | None |
Requirements: | |
Dependencies: | No dependencies |
Externals: | None |
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.