Custom plug-ins allow you to incorporate custom code into your master index application. When you create a custom plug-in for a master index application, you define the package and class names. To incorporate the plug-ins into the master index application, you then specify the fully qualified class name of the class in the appropriate configuration file. For example, if you create a custom plug-in named MergePolicy in the package com.sun.mdm.index.update, the value to enter for the class in update.xml is com.sun.mdm.index.update.MergePolicy.
You can create custom plug-ins that define custom processing or that define custom components. For additional information about how to implement specific custom-plug ins, see the following topics:
You create a custom plug-in by composing Java code in a source file using the NetBeans editor. Create the file in the Source Package folder of the EJB project associated with the master index application. Before you begin, determine the name of the package and class for the plug-in.
In the NetBeans Projects window, expand project_name-ejb (where project_name is the name of the main master index project.
To create a new package for the custom plug-in files, do the following:
To create the plug-in, do the following for each source file:
Under Source Packages, right-click the name of the package to which the new class will belong.
Point to New, and then click Java Class.
Enter the class name, verify the remaining fields, and then click Finish.
The new file appears in the NetBeans editor.
Create the custom processing rules using Java code.
When you are finished coding, save and close the file.
In the Projects window, right-click the file and then click Compile.
The output and status of the compiling process appears in the bottom panel.
If you do not compile a custom plug-in file, building the master index project will compile the files.
Specify the name of the custom plug-in in the appropriate master index configuration file.
If you modify a custom plug-in, be sure to recompile the file and regenerate the application to incorporate the changes. If the project has already been built, rebuild the project to add the custom plug-in to the EJB .jar file.