user manual
Chapter 25: Implementing Partition Interceptors 268
Creating the Interceptor Class
The <priority> element is an optional field that controls the order in which a
set of interceptors for a particular Partition are fired. This value must be
between 0 and 9. Priority 0 ranks before priority 9. Interceptors are fired in
order during load time and in reverse order during shutdown. If two or more
interceptors share the same priority, there is no way to determine or enforce
which of that set will be fired relative to the other.
The <argument> is an optional element which contains a pair of elements, <key>
and <value>. These are passed into your class implementation as a
java.util.HashMap. Your code must extract the appropriate values from this
type. The limit on arguments is imposed by the JVM implementation.
For example, the following XML defines an interceptor called InterceptorImpl
:
<module>
<Partition-interceptor>
<class-name>com.borland.enterprise.examples.InterceptorImpl</class-
name>
<argument>
<key>key1</key>
<value>value1</value>
</argument>
<argument>
<key>key2</key>
<value>value2</value>
</argument>
<argument>
<key>key3</key>
<value>value3</value>
</argument>
<priority>1</priority>
</Partition-interceptor>
</module>
Creating the Interceptor Class
Your class must implement:
com.borland.enterprise.server.Partition.service.PartitionInterceptor
The following methods are available:
public void initialize(java.util.HashMap args);
This method is called before any Partition services like the Tomcat container
are created and initialized. This method is not subject to the <priority>
parameter, since it is invoked as each interceptor is loaded.
public void startupPreLoad();
This method is called after Partition services are started and before the
Partition services load modules.










