activemq-classicjndioozie

how to set ActiveMQ connection username and password through JNDI


I am using Oozie, trying to enable its JMS notification feature. I used following JNDI string to connect activeMQ broker

java.naming.factory.initial#org.apache.activemq.jndi.ActiveMQInitialContextFactory;
java.naming.provider.url#tcp://localhost:61616;
connectionFactoryNames#ConnectionFactory

Currently oozie server will throw exception:

javax.jms.JMSException: User name [null] or password is invalid.

However, I don't know how to append user/password info in above JNDI string. Can someone help? thanks!


Solution

  • Just append "userName#foo;password#bar" in the JNDI string works for me finally