We currently use a JMS service that we connect to as a client, via some simple Java code (a Solace JMS service, that we are not the administrators of).
We are struggling to connect to the service using a JMSReceiver in FME Desktop. For simplicity, we have copied all of the relevant JAR files into the FME /plugins directory.
If we specify the Username in the transformer property, it is not recognized by the initial context factory (the context class returns a "Username must be specified" error). Instead, we have to use the "Additional Provider Properties" and specify:
java.naming.security.principal=myusername
java.naming.security.credentials=mypassword
Using my network traffic monitoring tool of choice (Wireshark), I can see the initial connection to the URL. However, the server returns a "The username or password is incorrect".
Questions:
- What is the JMSReceiver doing with the Username and Password fields?
- Is this the correct format for Additional Provider Properties? The documentation is not clear, and I cannot find any examples.
For reference, the working Java code we use is:
// Set the parameters for the initial context factory
Hashtable<String, Object> env = new Hashtable<String, Object>();
env.put(InitialContext.INITIAL_CONTEXT_FACTORY, myInitialContextFactoryClassName);
env.put(InitialContext.PROVIDER_URL, jndiProviderURL);
env.put(Context.SECURITY_PRINCIPAL, username);
env.put(Context.SECURITY_CREDENTIALS, password);
InitialContext initialContext = null;
try {
// This will connect and log into the provider URL
initialContext = new InitialContext(env);
// We did it!
....
Thanks in advance!