Define an extension for the registry filter
The registry filter specifies if an extensions is applicable to all registry instances or to specified instances.
For WebSphere Application Server traditional v9.0 and later, Application Extension Registry is stabilized. See Stabilized features of WAS traditional. We must have an extensible application to define an extension for the registry filter.
Complete the following steps to filter out extensions for an application.
Tasks
- 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 );
Subtopics
- Application extension registry
WAS has enabled the Eclipse extension framework for applications to use. Applications are extensible when they contain a defined extension point and provide the extension processing code for the extensible area of the application.- Application extension registry filtering
The extension registry exposes the registry filter extension point. The registry filter removes elements within the extension registry for client applications. Extensions that are attached to the registry filter extension point and that also implement this interface are called as necessary when a client operates on a named registry instance that matches the target specification.- plugin.xml file
A plug-in is described in an XML manifest file, called plugin.xml, which is part of the plug-in deployment files. The manifest file tells the portal application's runtime what it needs to know to register and activate the plug-in. The manifest file essentially serves as the contract between the pluggable component and the portal application's runtime. Although the WAS plugin.xml closely follows the one provided for the Eclipse workbench, it does diverge from the Eclipse workbench in several places.