At 14:04 26.6.01 +0200, you wrote:
>thanks, worked fine, but for clarification, I am getting a connection
>factory by executing from the producer a jndi lookup on
>plainsocket@router2. In a discussion thread on this subject, it was
>mentioned that I need to get a connection factory from the same router that
>has a queue on which you want to create a consumer. Makes sense, but how is
>this satisfied by looking up plainsocket@router2? ( if I lookup
>plainsocket, do i have connectivity to any queue on any router which has a
>connector in the sys$routing on router2?) Also, the context.provider_url is
>on port 4001. When I said that it worked fine, did my sample producer code
>really send a message from router2 to router1 or was router1 only used?
>
>thanks for the help - just trying to come to a good understanding.
>
JNDI lookups are working as topics. Each lookup is put on a build-in topic
called swiftmq.jndi and every router that is connected into the swiftmq
network gets this and processes it. This means that if you have two aliases
with the same name on different routers you cannot be sure that you will
get what you want.
For example:
- router1 has a JNDI alias "queue" pointing to "foo@router3"
- router2 has also a JNDI alias "queue" pointing to "foobar@router4"
- you want to get foobar@router4
- you connect to router1 and issue a JNDI lookup on "queue"
What you get is a queue, but you cannot be sure that is the right
one(foobar@router4). sometimes you get the right one and sometimes you
don't. So it is good to use different aliases on different router.
And the above goes for everything that you can lookup with JNDI. :)))
I hope this helps a bit :))
Best regards,
Kovi
>-----Original Message-----
>From: Gregor Kovač [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 26, 2001 6:47 AM
>To: [EMAIL PROTECTED]
>Subject: [developers] master/slave PTP configuration
>
>
>At 11:11 26.6.01 +0200, you wrote:
> >On Monday, June 25, 2001, Andreas Mueller wrote:
> > > The samples are intended for use with 1 router. You must modify the
> > > SynchQueueReceiver to lookup 'plainsocket@router2' (see
> > > SampleUtilities.java). That is the connection factory which creates
> > > connections to router2 on port 4002.
> >
> >But as I can see it doesn't matter which router is addressed by
> >Context.PROVIDER_ULR (port 4001 or 4002) - the only important
> >thing is to have proper lookup name for factory. And that thing
> >(not a port for provider-url) decides to which router we are going
> >to connect - connection/topic factory name.
> >Right?
>
>Yes, because this is only a JNDI connection, but you have to careful with
>factory connection names. So this means that the only important thing is to
>get a connection factory from the same router that has a queue on which you
>want to create a consumer.
>
>Best regards,
> Kovi
>
>
> >------------------------------------------------------
> >SwiftMQ developers mailing list * http://www.swiftmq.com
> >To unsubscribe from this list, send an eMail to
> >[EMAIL PROTECTED] and write in the body of your message:
> >UNSUBSCRIBE developers <your-email-address>
> >Archive: http://www.mail-archive.com/developers@mail.iit.de/
>
>
>------------------------------------------------------
>SwiftMQ developers mailing list * http://www.swiftmq.com
>To unsubscribe from this list, send an eMail to
>[EMAIL PROTECTED] and write in the body of your message:
>UNSUBSCRIBE developers <your-email-address>
>Archive: http://www.mail-archive.com/developers@mail.iit.de/
>
>
>------------------------------------------------------
>SwiftMQ developers mailing list * http://www.swiftmq.com
>To unsubscribe from this list, send an eMail to
>[EMAIL PROTECTED] and write in the body of your message:
>UNSUBSCRIBE developers <your-email-address>
>Archive: http://www.mail-archive.com/developers@mail.iit.de/
------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/