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 Index » IBM MQ Java / JMS » Flow doubt

Post new topic  Reply to topic
 Flow doubt « View previous topic :: View next topic » 
Author Message
lecmns
PostPosted: Thu Dec 27, 2001 11:39 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Guys..

I have a websphere machine (A) with an EJB
I have another machine (B) set up as a MQ Server

what I need to do is from 'A', I want to access a queue in 'B', put a message in that queue from 'A' and get a response back from 'B' in 'A'.

I am trying to get this done using MQ JMS APIs

What I need to know is the kind of things required in the machine 'A' and 'B'.

1. Do I need a MQ Client in 'A'? It is installed but doesn't look much helpful so far
2. MA88 Java classes for JMS is installed in 'A' as well as 'B'. Where do we require this actually?
3. Don't we require a remote queue in 'A' representing the local queue in 'B' for the complete flow? Let's leave the return flow for the time being..
4. Do we require only the Java classes for JMS in 'A' to connect to 'B'?
5. Do we have to configure a channel from 'A' to 'B'? I see no UIs to do this in 'A' from the MQ Client installed in 'A'. If we require to do that, how do I proceed with that?

I am getting stuck here pretty badly, I guess..

please enlighten me on this as early as possible.

A million Thankx in advance

MNS


Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Dec 28, 2001 7:48 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

You got a mix of 2 concepts in your questions here, so let's sort that first.

It sounds like you have a Queue manager on B, ond only the MQClient on A. As such, there will be no queues on A at all. A will have to establish a connection to B before it can put a message or get a message. This should be fine, unless you forsee box A trying to do work often while B is down. A has lost the ability to work 100% asynchronously from B. If A produces a request message and B is down, A will get an error when trying to put the request (actually when trying to connect).

Now contrast this to Scenario #2 where there is a Queue Manager (and queues) on both A and B. B can be turned off, yet A can happily keep putting request messages to it's queues, knowing that they will be delivered once B comes up.

So the first thing you have to do is make the business decision of which scenario you need. If A's request are such that they need an almost immediate response, who cares about scenario 2 and it's ability to store messages while B is down. The user on A don't wanna wait, and could care less that his messages are being queued, despite the inability to connect to B. In this case, go for the client set up. In a client setup, the app on A gets the added benefit of having the ability to connect to more than one queue manager at the same time, even if they are different boxes (perhaps C will have to be added to the mix in the future).

However, if A's request messages are important updates that should take place on B, and the reply is only a confirmation that it EVENTUALLY worked, then scenario 2 is the way to go. A can keep working regardless of B's status.

I'm gonna assume that you want scenario 1, so I'll answer your 5 questions with that in mind. (If you need scenario 2, these answers change, so respond back if that is the case and I'll reply back)


1. Do I need a MQ Client in 'A'? It is installed but doesn't look much helpful so far?
Yes, u need to install the MQClient on this box.
http://www-4.ibm.com/software/ts/mqseries/txppacs/txpm1.html

2. MA88 Java classes for JMS is installed in 'A' as well as 'B'. Where do we require this actually?
On both machines I believe.

3. Don't we require a remote queue in 'A' representing the local queue in 'B' for the complete flow? Let's leave the return flow for the time being..
If A is a client, there will be no MQSeries objects at all on A. Scenario 2 would require this.

4. Do we require only the Java classes for JMS in 'A' to connect to 'B'?
You need to install MQSERIES Client as well.

5. Do we have to configure a channel from 'A' to 'B'? I see no UIs to do this in 'A' from the MQ Client installed in 'A'. If we require to do that, how do I proceed with that?
You only need to have a SVRCONN type channel on B. See a post by TIA on the Installation and Configuration forum. I explained this step in detail there.

In your application on A, set the MQEnvironment.Hostname variable to the name of the B box. Set the MQEnvironment.Channel variable to the name of the SVRCONN channel on B. You can ignore the port variable if the QMGR u want to connect to on B is using 1414(the default). In Java, if you fill in the hostname varaible, your app is a client app, and if you leave it nulls, you app becomes a server app (provided the machine it is on has a Queue manager at that point (u still nned to code the correct channel and port if not 1414)). The neat thing with JAVA is u could have an app on a box with a queue manager, and simply by changing the hostname/channelname variable, have the app flipflop from client to server mode. Put those 2 variables in a text file and u don't even have to touch your code.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
lecmns
PostPosted: Fri Dec 28, 2001 9:46 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Hey Peter,

Thankx for this detailed reply
Many things are clear for me now..

As you said, my case is scenario 1
ie., I have a JMS Client in the System 'A' and a machine 'B' acts as MQ Server

As you said, there will b no queue in 'A' and as of now, we are not looking at a situation where the 'A' box has to work without 'B'. So, asuuming that 'A' and 'B' has to be on always, let's proceed.

I have MQ Client in 'A', MA88 in 'A' and 'B' and a channel in 'B'
Since I want my code to work as client application, I have mentioned the hostname
I have tried a Java code using pure MQ APIs to connect and put a message to queue in 'B' and that has worked.

What I basically wanted was to do the same with MQ JMS APIs..

with the code I have.. I am getting some probs.. do I require a MQM.dll in the JMS Client side? It's asking for that when i try to create a QueueConenction. I am confused..

MNS

Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Jan 02, 2002 7:18 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

Someone else will have to jump in to answer this latest question. I have no experience with JMS.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Flow doubt
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.