Novell IdM 3.6 : Creating custom Subscriber PostProcessor Java extension for Delimited Text Driver Part 1
I had chance to write a custom PostProcessor extension for a Delimited Text Driver for Novell Identity Manager,
"the PostProcessor extension should execute the code under another Windows Domain User account. So I decided to run the driver with Remote Loader Configuration, running the DirXML windows Service under another Windows Domain User Account."
Software and settings in my setup:
* Novell Designer 3.0.1 (build Jan 5, 2009)
* Novell Identity Manager 3.6 / Windows Server 2003 R2
* Novell iManager 2.7.2
* Delimited Text Driver 3.6 ver 2.0 (imported configuration file from Designer 3.0.1)
* And the Delimited Text Driver was going to run on the remote server (Remote Loader),
* Java IDE was (IntelliJIDEA)
i started first with digging into documentation of the driver, and i came a cross this section:
Using Java Interfaces to Customize File Processing:
so in my case i was about to wite a Subscriber PostProcessor extension for my use.
so to complete the process, i performed following tasks:
- Create a Java class that implements one of the new interfaces
- Create a Java .jar file that contains your new class, and deploy it
- Configure the driver to use the new class
Create a Java class that implements one of the new interfaces:
Writing interface requires you to understand little UML about the interface, so i got to read javaDoc for the delimited text driver, which i found on the Installation media of the Novell Identity Manager 3.6 ..delimited\delimitedtext\javadocs\api docs\index.htm
Class Diagram
While creating your custom class, your class has to implement the interface in package com.novell.nds.dirxml.driver.delimitedtext.PostProcessor, which extends the interface Extension.
Methods that interface PostProcessor requires to be implement by your class are:
void nextOutputFile(java.io.File outputFile)
void init(java.lang.String parameterString, Tracer tracer) (inherited from the interface Extension).
to implement these abstract methods , you need to import some libs into your java project.
import com.novell.nds.dirxml.driver.delimitedtext.PostProcessor;
import com.novell.nds.dirxml.driver.delimitedtext.StatusException;
import com.novell.nds.dirxml.driver.delimitedtext.Tracer;
import java.io.*;
you will find these imports in JAR "DelimitedTextUtil.jar", in my case "C:\Novell\RemoteLoader\lib" on the server where i have installed the Remote Loader software and the Delimited Driver shim.
implementation foot print of methods in my class:
public void nextOutputFile(java.io.File outputFile)
{
// TODO: do something with the notified outputFile the driver just created in the output directory.
}
public void init(String paramsHere, Tracer paramHereTracer)
throws StatusException, Exception
{
//TODO: if you want to initialize your classe with some paramters from the driver, then you need to implement this method. In my case it was not required!
}
Create a Java .jar file that contains your new class, and deploy it
I had to package my class into a JAR file ( excluding external libs). and copied that .JAR file to the remote server where the Remote Loader was running: into the path "C:\Novell\RemoteLoader\lib"
Configure the driver to use the new class
the pre-configured .XML file does not come up with the configuration paramters, so you have to define them on your driver. Click the Driver, Under the Driver Configuration Tab, goto the Driver Paramter Section, and click the "Edit Xml".
Find the section name
subscriber-options
configuration-values
definitions
under these definations add following two definations: ( please mind you have define them as other definations are defined, im writing here just names and values here in another format)
name="post-processor" type="string" value= mypackage.CustomPostProcessor
name="post-processor-params" type="string" value=
so, Finally close the Configuration tab and try to Start the Driver, it should start without any problems and will do the stuff which you expect from your class to do.
Few things which help:
* Before deploying your class, test it localy in the IDE with the scenarios you want to acheive.
* Deploy and run the IdM Delimited Driver with Local setup first, Which in turns can give you good debugging info about your class in DSTrace view.
* After testing the class, you can deploy your code on the remote server, with remote loder configuration.
Debugging remote requires attaching java Debuger into Remote Loader JVM. which can be little tricky, if you are not familar attaching java debugger already. so its good to run the driver Local first if you want to see if your class hooks with driver configuration.
Comments
JMeter Training in Chennai
learn JMeter
JMeter Course
JMeter Training in OMR
Appium Training in Chennai
javascript training in chennai
core java training in chennai
C C++ Training in Chennai