this is a late reply, but maybe this could be usefull for some others. :-)

 “invalid security authentication supplied for MQQueueManager”
or the full error:
"org.springframework.jms.JmsSecurityException: MQJMS2013: invalid security
authentication supplied for MQQueueManager; nested exception is
javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication
supplied for MQQueueManager; nested exception is com.ibm.mq.MQException:
MQJE001: An MQException occurred: Completion Code 2, Reason 2035 MQJE036:
Queue manager rejected connection attempt"

states out that the request for access to the queue is short of
authentication properties. in case of Tomcat JNDI registry: you cannot set
the username/password property.

the following settings work fine for me on Tomcat6.0 and MQ on iSeries,
usings tomcat jndi registration and spring JMS

context:
<Context path="/some-server" docBase="some-server" debug="5"
        reloadable="true" crossContext="true" antiJARLocking="true">

        <!-- JMS SUPPORT FOR MQSeries - The connection factory -->
        <Resource 
                name="jms/MQConnectionFactory" 
                auth="Container"
                type="com.ibm.mq.jms.MQQueueConnectionFactory"
                factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory"
                description="JMS Queue Connection Factory for sending messages"
                HOST=<host> 
                PORT=<port> 
                CHAN=<channel> 
                TRAN="1"
                QMGR=<queue manager>    />

        <!-- JMS SUPPORT FOR MQSeries - the queue to send to -->
        <Resource 
                name="jms/MQReader" 
                auth="Container" 
                type="com.ibm.mq.jms.MQQueue" 
                factory="com.ibm.mq.jms.MQQueueFactory"
                description="JMS Queue for sending messages"
                QU=<queue> />
        
        <!-- JMS SUPPORT FOR MQSeries - the queue to read from -->
        <Resource 
                name="jms/MQWriter" 
                auth="Container" 
                type="com.ibm.mq.jms.MQQueue" 
                factory="com.ibm.mq.jms.MQQueueFactory"
                description="JMS Queue for receiving messages"
                QU=<queue> />

</Context>

you can define the security using spring via the
UserCredentialsConnectionFactoryAdapter:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:context="http://www.springframework.org/schema/context";
        xmlns:tx="http://www.springframework.org/schema/tx";
        xmlns:jms="http://www.springframework.org/schema/jms";
        xmlns:jee="http://www.springframework.org/schema/jee";
        xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                                                
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
                                                
http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms-2.5.xsd
                                                
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
                                                
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd";>

        <!-- ************************************************************** -->
        <!-- JMS queue setting to talk to JNDI defined MQSeries connections -->
        <!-- ************************************************************** -->
        
        <!-- Wrap the jndi connectionFactory in a Spring JndiObject -->
        <bean id="internalJMSQueueConnectionFactory"
                class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName">
                        <value>java:comp/env/jms/MQConnectionFactory</value>
                </property>
        </bean>

        <!-- Wrap the connectionFactory in order to be able to add security on
creation time -->
        <bean id="jmsQueueConnectionFactorySecured"
        
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
                <property name="targetConnectionFactory"
ref="internalJMSQueueConnectionFactory" />
                <property name="username" value="******" />
                <property name="password" value="******" />
        </bean>

        <!-- Reading -->
        <!-- Rip the destination right out of JNDI  -->
        <jee:jndi-lookup id="jmsDestinationResolverReader"
jndi-name="java:comp/env/jms/MQReader" resource-ref="true" />
        <!-- JMS Queue Template -->
        <bean id="jmsReader" 
class="org.springframework.jms.core.JmsTemplate102">
                <!-- Factory creating the connections -->
                <property name="connectionFactory">
                        <ref bean="jmsQueueConnectionFactorySecured" />
                </property>
                <!-- Use defaultDestination in order to be able to use JNDI 
directly -->
                <property name="defaultDestination">
                        <ref bean="jmsDestinationResolverReader" />
                </property>
                <!-- We are accessing queue: so false -->
                <property name="pubSubDomain">
                        <value>false</value>
                </property>
                <!-- Wait a meaningFull time for response -->
                <property name="receiveTimeout">
                        <value>60000</value>
                </property>
        </bean>

        <!-- Writing -->
        <!-- Rip the destination right out of JNDI  -->
        <jee:jndi-lookup id="jmsDestinationResolverWriter"
jndi-name="java:comp/env/jms/MQWriter" resource-ref="true" />
        <!-- JMS Queue Template -->
        <bean id="jmsWriter" 
class="org.springframework.jms.core.JmsTemplate102">
                <!-- Factory creating the connections -->
                <property name="connectionFactory">
                        <ref bean="jmsQueueConnectionFactorySecured" />
                </property>
                <!-- Use defaultDestination in order to be able to use JNDI 
directly -->
                <property name="defaultDestination">
                        <ref bean="jmsDestinationResolverWriter" />
                </property>
                <!-- We are accessing queue: so false -->
                <property name="pubSubDomain">
                        <value>false</value>
                </property>
                <!-- Wait a meaningFull time for response -->
                <property name="receiveTimeout">
                        <value>60000</value>
                </property>
        </bean>

        <!-- ************************************************************** -->
        <!-- Beans injected with JMSQueueing                                -->
        <!-- ************************************************************** -->
        
        <!-- Bean used for sending messages -->
        <bean id="rvaSender" class="somepackage.Sender">
                <property name="jmsTemplate102">
                        <ref bean="jmsWriter" />
                </property>
        </bean>
        
        <!-- Bean used for receiving messages -->
        <bean id="rvaReceiver" class="somepackage.Receiver">
                <property name="jmsTemplate102">
                        <ref bean="jmsReader" />
                </property>
        </bean>

</beans>
-- 
View this message in context: 
http://www.nabble.com/Websphere-MQ-configuration-tp18585525p20106071.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to