Now that you have created new JNDI security classes and factories and registered them with the JNDI Security Registry, the final step is to configure the bridge connection to use them. Do this using the connection definition for the bridge JNDI connection as in the following example:
JNDIConnectionDefinition swtest = bridge.createJNDIConnectionDefinition("secConn");
Note that the value specified in the setSecurityClassName should match the value that is returned by the getName method of the JNDISecurityFactory implementation required. This is the link between the factory registered via the bundle and the JNDI bridge connection itself. Once you have set this value, when the bridge connects via the JNDI provider, it should now find the security factory in the registry and apply the required security logic.
Parent topic: Adding JNDI security properties