ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportTwo proxy servlets working with one broker (help!)

Post new topicReply to topic
Two proxy servlets working with one broker (help!) View previous topic :: View next topic
Author Message
hopsala
PostPosted: Mon Jul 11, 2011 5:25 am Post subject: Two proxy servlets working with one broker (help!) Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

I've got an odd one for you, and it's pretty urgent.

My question is simple - can you use two servlets against one broker?

Obviously this is patchwork, but we need this as a temporary solution. Here's the scenario: We've got an old version of the servlet in prod, and a newer one in test. A prod client has recently been getting errors, but everything works fine in tests. This has to do with the older servlet version, which lacks a relevant fix.
Now we can't just upgrade the prod servlet. It's quite a lengthy procedure of testing and confirmations to upgrade something that affects everyone. So we thought we'd install the newer servlet listening on a different port, and direct the problematic client to it. All the other clients will go on calling the old servlet and (we hope) be entirely unaffected by all this.

If this is possible, and there are no snags, the problematic client can go back to work and we can upgrade the servlet in our own time. So can two servlets run against a single broker? This should work in theory but I am wary of putting up something like this in prod before knowing it can be done in practice. If anyone has tried this or knows enough about the servlet it'll be greatly appreciated. Thanks!
Back to top
View user's profile Send private message
hopsala
PostPosted: Mon Jul 11, 2011 5:47 am Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

I've found this in the IE01 support pack pdf:
Quote:
The Proxy Servlet has a “many” to “one” affinity with the Message Brokers (Many Proxy Servlets can
service one broker but one Servlet can only service one broker).

But it lacks an explanation, and this line does not appear, as far as I can see, in the info center for the newer versions..

And there's an additional worry - can I put these two servlets, which are in different versions, on the same Tomcat?
I'm wondering if there's no singleton behind the scenes, or how the two will consume resources etc..

p.s WMB v6 (yes, yes, I know..)
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jul 12, 2011 6:51 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

My understanding is that the servlets talk to the broker via MQ, so you should be fine for what you want to do.
Back to top
View user's profile Send private message
hopsala
PostPosted: Wed Jul 13, 2011 1:24 am Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

It does indeed. After some checking it turns out that the servlet opens a new MQCONN for each HTTP session, and uses the usual MessageId-CorrelationId to correlate requests and replies, which means that there's no problem running many servlets against one broker. To make sure a request goes to the appropriate HTTPInput, the servlet fills in a CorrelationId that fits that node.
When I wrote this post I also thought that the servlet somehow 'registeres' itself against the broker URLs, but no such thing occurs. The servlet simply reads the config file (or queue >V6) to find out which URLs are published, but the broker is not made aware whether a servlet is actually servicing it or not.

In short, although I don't know if anyone has actually tried this in a real env, it should be possible. If we go that route I'll post my experience here (though recent developments make me doubt that we will)
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportTwo proxy servlets working with one broker (help!)
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.