cancel
Showing results for 
Search instead for 
Did you mean: 

JMSAdapter: Access to SonicMQ via JNDI

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Bart

I want to change the GroupID

what is the right NAME/Value for me ?

thx,shai