How to Avoid Anonymous Lookups on JMS Queues
(Doc ID 2202205.1)
Last updated on FEBRUARY 20, 2024
Applies to:
Oracle WebLogic Server - Version 10.3.6 and laterInformation in this document applies to any platform.
Goal
When no credentials are provided in the initial context, by default a JMS client can lookup the JMS resources. It may be desired to remove this lookup.
eg:
Hashtable properties = new Hashtable();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
// NOTE: The port number of the server is provided in the next line,
// followed by the userid and password on the next two lines.
properties.put(Context.PROVIDER_URL, "t3://<HOSTNAME>:<PORT>");
properties.put(Context.SECURITY_PRINCIPAL, "<USERNAME>");
properties.put(Context.SECURITY_CREDENTIALS, "<PASSWORD>");
Even without SECURITY_PRINCIPAL or SECURITY_CREDENTIALS, the JMS client program can connect to the server, lookup queues and read/write JMS messages.
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |
References |