activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Gomes <jgo...@apache.org>
Subject Re: ActiveMQ NMS Fails when User/Password Required
Date Thu, 05 Jun 2014 18:55:04 GMT
This code works, and it is used frequently.  Following is a snippet from my
own code.  I recommend staying at the generic NMS API level, and not using
ActiveMQ provider specific APIs.  You will have much greater portability
success between different NMS providers.

IConnectionFactory cf = new NMSConnectionFactory(providerURLs,
connectionID);
IConnection connection = cf.CreateConnection(userName, password);


Best,
Jim



On Thu, Jun 5, 2014 at 10:55 AM, pwalter <patrick.walter@nasa.gov> wrote:

> ActiveMQ NMS fails when User/Password is required. ActiveMQ with JAVA works
> with same URL/user/pwd.
>
>                 Uri connecturi = new Uri(url);
>                 IConnectionFactory factory = new
> Apache.NMS.ActiveMQ.ConnectionFactory(connecturi);
>
>                 connection = factory.CreateConnection(user, password);
>                 connection.Start();
>
> Error: Apache.NMS.ActiveMQ.ConnectionClosedException: The connection is
> already closed!
>
> Any Ideas ??
> THANKS FOR YOUR QUICK RESPONSE!!!
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-Fails-when-User-Password-Required-tp4681728.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message