On Thu, Jan 14, 2016 at 9:27 AM, spruitt <steve.pru...@hp.com> wrote:
> That is the code I started with.  But I get:
>
> Exception in thread "main" javax.jms.JMSSecurityException: AMQ119031: Unable
> to validate user
>
> So next I started trying:
>
> connection = connectionFactory.createConnection(user, pw);
>
> But I still get:
>
> Exception in thread "main" javax.jms.JMSSecurityException: AMQ119031: Unable
> to validate user


There are a lot of examples on the distribution. Maybe you could look
at how they are configured?
>
> Properties p = new Properties();
> p.put("java.naming.factory.initial",
> "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
> p.put("connectionFactory.ConnectionFactory",
> "amqp://localhost:5672&amqp.vhost=localhost");
> p.put("queue.queue/exampleQueue", "exampleQueue");
> initialContext = new InitialContext(p);



I don't know where you took this amqp example from?
ActiveMQInitialContextFactory from our JNDI doesn't know how to deal
with AMQP or other libraries.  Look at the AMQP example to how to
instantiate an AMQP connection factory. I don't think you can use JNDI
with that. (Unless the AMQP-jms provides you the JNDI)

Reply via email to