activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Gomes" <e.se...@gmail.com>
Subject Re: AMQNET Nms cannot use multiple connections, gets InvalidClientIDException
Date Thu, 24 Apr 2008 00:24:16 GMT
Stefan,

I checked in a change that should fix this problem.  Looks like it was
an incomplete change.  Would you grab the latest and see if that fixes
your problem?

Thanks!
-Jim




On 4/23/08, James Strachan <james.strachan@gmail.com> wrote:
> On 23/04/2008, StefanL <stefan_lun@yahoo.se> wrote:
> >
> >  I'm trying to upgrade our activemq-dotnet from September 2007 to current
> >  revision.
> >  I though get an error in our code which creates multiple connections to
> the
> >  broker and I get the
> >  javax.jms.InvalidClientIDException: Client: <guid> already connected from
> >  <ip:port>
> >
> >  I can easily reproduce the error with this simple test case:
> >     [Test]
> >     public void TwoConnections()
> >     {
> >         Apache.NMS.IConnectionFactory connectionFactory = new
> >  Apache.NMS.ActiveMQ.ConnectionFactory(new Uri("tcp://localhost:61616"));
> >         Apache.NMS.IConnection connection1 =
> >  connectionFactory.CreateConnection();
> >         connection1.Start();
> >         Apache.NMS.IConnection connection2 =
> >  connectionFactory.CreateConnection();
> >         connection2.Start();
> >         [snipped away stop and dispose]
> >     }
> >
> >  I've drilled down the behavioural change to ActiveMQ.ConnectionFactory
> >  constructors and
> >  CreateConnectionInfo.
> >  The thing is that in revision 589629 the connection factory was changed
> so
> >  the member
> >  clientId got set by the ctor and then used for connections created.
>
> That sounds like a bug! Being able to specify the clientID as a
> property on the connection factory is useful, but it should maybe be
> smart enough to only use it for the first connection it creates.
>
> BTW does this only happen if you set the clientID property on the
> connection factory?
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>

Mime
View raw message