The registry filter specifies if an extensions is applicable to all registry instances or
to specified instances.
Before you begin
Note: For WebSphere® Application Server 傳統版
9.0 版 and later, Application Extension
Registry is stabilized. For more information, see Stabilized features of WebSphere Application
Server traditional.
You must have an extensible application to define an extension for
the registry filter.
About this task
Complete the following steps to filter out extensions for an application.
Procedure
- Define an extension for the registry filter extension point for a named registry instance in
the plugin.xml file.
<extension point=“org.eclipse.extensionregistry.RegistryFilter”>
<filter name=“AdminConsole*”
class=“com.ibm.ws.admin.AdminConsoleExtensionFilter”/>
</extension>
- Add the filter implementation to the application by creating a class to implement the
com.ibm.workplace.extension.IExtensionRegistryFilter interface.
package com.ibm.ws.admin;
import com.ibm.workplace.extension.IExtensionRegistryFilter;
public class AdminConsoleExtensionFilter implements IExtensionRegistryFilter {
:
}
- The extensible application declares the registry name by defining an extension for the
RegistryInstance extension point. This way, the registry can prepare an IExtensionRegistry instance
and put it in JNDI in advance.
<extension point=“org.eclipse.extensionregistry.RegistryInstance”>
<registry name=“AdminConsole”/>
</extension>
- The extensible application obtains a named instance of the registry to activate any associated
filters:
InitialContext ic = new InitialContext();
String lookupName = “services/extensionregistry/AdminConsole”;
IExtensionRegistry reg = (IExtensionRegistry)ic.lookup( lookupName );