user manual
Chapter 25: Implementing Partition Interceptors 269
Creating the Interceptor Class
public void startupPostLoad();
This method is invoked after all Partition services have loaded their respective
modules.
public void shutdownPreUnload();
This method is called before the Partition services unload their respective
modules. The <priority> parameter now reverses its meaning; priority 9
interceptors are called first, then priority 8, and so forth.
public void shutdownPostUnload();
This method is called after the services have unloaded their modules.
public void PartitionTerminating();
This method is called after the services have been shut down, just before the
Partition shuts down.
The following code sample shows the class InterceptorImpl defined in the
module-borland.xml descriptor above:
package com.borland.enterprise.examples;
// This interface is contained in xmlrt.jar
import
com.borland.enterprise.server.Partition.service.PartitionInterceptor;
public class InterceptorImpl implements PartitionInterceptor {
static final String _className = "InterceptorImpl";
public void initialize(java.util.HashMap args) {
// Writing to System.out and System.err will
// cause the output to be logged.
// There is no requirement to log.
System.out.println(_className + ": initialize");
System.out.println("key1 has value " + args.get("key1").toString());
System.out.println("key2 has value " + args.get("key2").toString());
System.out.println("key3 has value " + args.get("key2").toString());
}
public void startupPreLoad() {
// Writing to System.out and System.err will
// cause the output to be logged.
// There is no requirement to log.
System.out.println(_className + ": startupPreLoad");
}
public void startupPostLoad() {
// Writing to System.out and System.err will
// cause the output to be logged.
// There is no requirement to log.
System.out.println(_className + ": startupPostLoad");
}
public void shutdownPreUnload() {
// Writing to System.out and System.err will
// cause the output to be logged.










