To test the Java™ plug-in outside of the federated server, develop an application that connects to and retrieves user mappings from the external repository.
You can develop a simple program that calls the lookupUM() method that your UserMappingRepositoryXXXX class inherited from the UserMappingRepository class to connect to the external repository and retrieve user mappings. You can view the UserMappingLookupLDAP.java file that is located in the sqllib/samples/federated/umplugin/ldap/ directory.
In the commands below, if the full path contains spaces, then you must enclose the full path in quotation marks, for example "C:\program files\sqllib\java\db2umplugin.jar". %DB2PATH% is the directory where DB2® is installed, for example, C:\ProgramFiles\IBM\sqllib. inst_home is the instance home directory.
To test the user mapping plug-in:
java -classpath "%DB2PATH%\java\db2umplugin.jar; ^
.\UserMappingRepositoryXXXX.jar;%CLASSPATH%" ^
UserMappingLookupXXXX -server remoteServerName ^
-authid iiAuthid ^
-instance iiInstance -database iiDatabase
java -classpath inst_home/sqllib/java/db2umplugin.jar: ^
./UserMappingRepositoryXXXX.jar:$CLASSPATH \
UserMappingLookupXXXX -server remoteServerName \
-authid iiAuthid \
-instance iiInstance -database iiDatabase