Author |
Message
|
pelife |
Posted: Tue Jul 24, 2012 10:18 am Post subject: ignoring java.naming.security.principal |
|
|
 Novice
Joined: 15 Mar 2012 Posts: 10 Location: Rio de Janeiro - BR
|
I have an application running that must connect to Websphere MQ to wirte messages to and read from it. Following the manual of this application, the right way to configure is as follows:
Code: |
<jndi:jndi-lookup id="jmsConnectionfactory" jndi-name="${dsi.messaging.jndi.name}">
<jndi:environment>
java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory
java.naming.provider.url=NRIO239DWMB.develop.net:1414/DEVBTGQMChannel
java.naming.security.authentication=none
java.naming.security.principal=assetcontrol
java.naming.security.credentials=
</jndi:environment>
</jndi:jndi-lookup>
|
I tryed many combinations of java.naming.security.authentication, java.naming.security.principal and java.naming.security.credentials and I keep having the same problem:
Caused by: com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2035'.
The guy who is monitoring the server says that my application is trying to connect with the user I am running it and not with the one I configured. Have someone had the same problem already ?
It seems like it is just ignoring whatever I put in those field and using the user name I am logged with.[/code] |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Jul 24, 2012 11:59 am Post subject: Re: ignoring java.naming.security.principal |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
pelife wrote: |
... Following the manual of this application, ... |
What manual? Post the URL here. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jul 24, 2012 12:03 pm Post subject: Re: ignoring java.naming.security.principal |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
pelife wrote: |
java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory |
This means that it is connecting to WMQ to use WMQ as a JNDI provider, in addition to using it to connect and act as a JMS server.
So you may need to configure the initial context user id as well as the qcf user id. |
|
Back to top |
|
 |
pelife |
Posted: Tue Jul 24, 2012 12:23 pm Post subject: |
|
|
 Novice
Joined: 15 Mar 2012 Posts: 10 Location: Rio de Janeiro - BR
|
The manual does not say much more than what I just did. It gives an example of how they would make it with Weblogic:
Code: |
< jndi:jndi-lookup id =" jmsConnectionfactory " jndi-name =" ${dsi.messaging.jndi.name}">
< jndi:environment >
java.naming.fa ctory.initial = WebLogic.jndi.WLInitialContextFactory
java.naming.provider.url = t3://172.24.43.136:7001
java.naming.security.principal= WebLogic
java.naming.security.credentials = <!-- password-->
</ jndi:environment >
</ jndi:jndi-lookup >
|
What is the qcf user id? sorry if it is a dumb question |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 24, 2012 12:28 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pelife wrote: |
The manual does not say much more than what I just did. It gives an example of how they would make it with Weblogic: |
This isn't Weblogic.
pelife wrote: |
What is the qcf user id? sorry if it is a dumb question |
It's the user id associated with the queue connection factory. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pelife |
Posted: Wed Jul 25, 2012 3:36 am Post subject: |
|
|
 Novice
Joined: 15 Mar 2012 Posts: 10 Location: Rio de Janeiro - BR
|
I know that this isn't weblogic, I was just showing what the manual of the software I am trying to configure says.
Code: |
<jndi:jndi-lookup id="jmsConnectionfactory" jndi-name="${dsi.messaging.jndi.name}">
<jndi:environment>
java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory
java.naming.provider.url=NRIO239DWMB.develop.net:1414/DEVBTGQMChannel
java.naming.security.authentication=none
java.naming.security.principal=assetcontrol
java.naming.security.credentials=
</jndi:environment>
</jndi:jndi-lookup>
|
Vitor, if the way of doing this is not setting the property java.naming.security.principal, I don't know where else I can configure this. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 25, 2012 4:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pelife wrote: |
Vitor, if the way of doing this is not setting the property java.naming.security.principal, I don't know where else I can configure this. |
I know a couple of WMQ places you can configure this.
I'll leave more Java qualified people (i.e. everybody) to speak to the wisdom of this method & what's the way to achieve it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jul 25, 2012 4:39 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
pelife wrote: |
The manual does not say much more than what I just did. |
What manual? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|