+

Search Tips   |   Advanced Search

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

  1. 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>
    

  2. 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 {
            :
    }
    

  3. 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>
    

  4. 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