Defining an extension for the registry filter

The registry filter specifies if an extension is applicable to all registry instances or to specified instances.

Before you begin

Note: For WebSphere® Application Server traditional Version 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

  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 );