Atomikos Forum

HornetQ JMS connection factory is not accepting user/password

I've created com.atomikos.jms.AtomikosConnectionFactoryBean and passed a HornetQ ConnectionFactory. After enabling the security and providing the user/password by xaProperties to AtomikosConnectionFactoryBean the JMS connection is not created.

We have atomikos 3.9.22, Spring 3.2, Jboss EAP 6.2, hornetq 2.2.13.
Vikash Kaushik Send private email
Tuesday, May 19, 2015
 
 
Configuration:
<bean name="hornetConnectionFactory" class="org.hornetq.jms.client.HornetQXAConnectionFactory">
    <constructor-arg name="ha" value="false"></constructor-arg>
    <constructor-arg>
        <bean name="transportConfiguration" class="org.hornetq.api.core.TransportConfiguration">
            <constructor-arg
                value="org.hornetq.core.remoting.impl.netty.NettyConnectorFactory" />
            <constructor-arg>
                <map key-type="java.lang.String" value-type="java.lang.Object">
                    <entry key="host"
                        value="#{ propertiesForEnvironment.getProperty('jms.hostname')}" />
                    <entry key="port"
                        value="#{ propertiesForEnvironment.getProperty('jms.port')}" />
                </map>
            </constructor-arg>
        </bean>
    </constructor-arg>
</bean>

<bean name = "singleConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
    <property name="targetConnectionFactory" ref ="queueConnectionFactoryBean" />
    <property name="reconnectOnException" value ="true" />
</bean>

<bean id="queueConnectionFactoryBean" class="com.atomikos.jms.AtomikosConnectionFactoryBean"
    init-method="init" destroy-method="close">
    <property name="uniqueResourceName">
        <value>JMSXA</value>
    </property>
    <property name="xaConnectionFactory">
        <ref bean="hornetConnectionFactory" />
    </property>
    <property name="minPoolSize" value="#{ propertiesForEnvironment.getProperty('jms.connection.pool.min') }" />
    <property name="maxPoolSize" value="#{ propertiesForEnvironment.getProperty('jms.connection.pool.max') }" />
    <property name="xaProperties">
        <props>
            <prop key="user">abcd</prop>
            <prop key="password">abcd@1234</prop>
        </props>
    </property>
</bean>


<!-- Definition of the Channel( JMS topic)  -->
<bean id="TopicDestination" class="org.hornetq.jms.client.HornetQTopic">
    <constructor-arg index="0" value="ChannelTopic"></constructor-arg>
</bean>

<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="singleConnectionFactory" />
    <property name="pubSubDomain" value="true"/>
    <property name ="sessionTransacted" value="true"/>
</bean>
Vikash Kaushik Send private email
Tuesday, May 19, 2015
 
 
Please anyone can reply. I'm getting connection timeout for DB and JMS too.

For DB we are using testQuery and JMS has max life time upto 3 minutes.
Vikash Kaushik Send private email
Thursday, June 11, 2015
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics