on 07-29-2005 2:10 PM
Hello,
We need to connect to SonicMQ via JNDI. We need the JNDI access because of Clustering/High Availabity functionalities which we can not achieve via the SonicMQ specific settings of the JMS adapter. When doing the initial context lookUp for the connectionFactory, we need to provide the following parameters. (below is an extract from a stand alone test java program.)
Context context = null;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sonicsw.jndi.mfcontext.MFContextFactory"); env.put(Context.PROVIDER_URL, JNDI_CONN_URL);
env.put(Context.SECURITY_PRINCIPAL,USERNAME);
env.put(Context.SECURITY_CREDENTIALS, PASSWORD);
env.put("com.sonicsw.jndi.mfcontext.domain",DOMAIN);
How can we specify this last 'DOMAIN' parameter?
We tried it via aditional JMS Parameters. We added the following (name,value)pair.
com.sonicsw.jndi.mfcontext.domain,DOMAIN
This had no effect. In the log we found the following messages:
Key com.sonicsw.jndi.mfcontext.domain is no JMS parameter.
Get JNDI context with this env hash: {java.naming.factory.initial=com.sonicsw.jndi.mfcontext.MFContextFactory, java.naming.provider.url=tcp://sonic_prod1.telindus.intra:2500, java.naming.security.
principal=Administrator, java.naming.security.credentials=Administrator}
---> Please note that the domain parameter is missing here!
Any ideas?
Greetings,
Bart
I was able to find the solution:
You need to put the following in the JMS Paramerets
Name = JNDI.InitialContext.property.
Value = java.lang.String com.sonicsw.jndi.mfcontext.domain, java.lang.String DomainXYZ
Using this way you can add any parameter you which to the InitialContext.
Greetings,
Bart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.