Author |
Message
|
Ratan |
Posted: Thu Jan 16, 2003 4:24 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Quote: |
I have two Client Concetrators QM1 and QM2 both of them talking to this SYSTEM
I have an app running MQClient talking to WF thru QM1. What if QM1 goes down. I want my app to dynamically connect to QM2. How can I achieve this.
If I say
configId is FMC1 and logon(FMCGRP, FMCSYS) then it would try thru QM1.
When it cannot connect to QM1 I switch the configId to FMC2 and try to connect to WF thru the other client concentrator.
|
Venny,
I dont see any use for the setConfigId for the situation you described. This is a purely MQSeries related question 'How an MQClient failovers to another server'. I dont see any involvement of MQWF related settings in this. May be I am wrong, but I hope not.
-Laze |
|
Back to top |
|
 |
vennela |
Posted: Thu Jan 16, 2003 4:53 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
FMC1:
Connect Names
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMC2:
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM2 FMC
You cannot have
FMC1
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMCGRP FMCSYS QM2 FMC
This is because you can't have two connect names with same GROUP and SYSTEM.
Whatever solution you use I still see QM1 as a single point of failure and the app need to connect to QM2.
So, if in you workflow java app if you issue a simple
ExecutionService service = agent.locate("",""); then it would go to
QM1. If QM1 is down and if your app has to connect to QM2 then MQClient can very well do that but your app before even going to QM2 would come back saying that
Code: |
Error Message : FMC00124E Profile or keyword in profile not found |
You can get rid of this error by adding the connect names which you can't do in a single configuration
For this you need to have a different configuration called FMC2.
If your app has to switch the configID then you do need something like setConfigurationID
---
Venny |
|
Back to top |
|
 |
kriersd |
Posted: Fri Jan 17, 2003 7:33 am Post subject: |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
Just a quick observation here.
So the real question is:
What would be the proper way to setup a java application that logs into the a workflow system? Given that the system you wish to log into is not the default configuraton on the current machine. I believe you would need to set the configuration id in the code along with the proper system and system group name.
Code: |
agent.setConfigurationID("FMC2);
agent.setLocator(Agent.LOC_LOCATOR);
agent.setName("MQWFAGENT");
service = agent.locate(FMCGRP,FMCSYS2);
SMode = SessionMode.DEFAULT;
service.logon2(UserID, Password,SMode, AbsenceIndicator.LEAVE );
|
Does this sound correct.
Dave _________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
praveenchhangani |
Posted: Fri Jan 17, 2003 7:56 am Post subject: |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 192 Location: Chicago, IL
|
Dave
Quote: |
I believe you would need to set the configuration id in the code along with the proper system and system group name.
|
I believe you are right Dave. We definitely need the SetConfigurationID as you described. I also posted this on the IBM newsgroup and they also came up with something very similar.
Code: |
Agent agent =3D new Agent();
try
{
agent.setConfigurationID(mqwfConfig);
agent.setName("MQWFAgent");
}
|
What's also interesting is that apparently you can only use this call once per executable(java virtual machine) - which means these code snippets will probably end up somewhere initialization parameters. _________________ Praveen K. Chhangani,
IBM Certified Solutions Designer -
MQ Workflow 3.4. |
|
Back to top |
|
 |
Ratan |
Posted: Fri Jan 17, 2003 9:19 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
I am still lost with with what venny says.
Quote: |
FMC1:
Connect Names
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMC2:
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM2 FMC
You cannot have
FMC1
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMCGRP FMCSYS QM2 FMC
|
You cannot have FMC2 with FMCGRP FMCSYS QM2 FMC, because you already have FMCSYS defined for FMC1 and you cannot have two systems with the same names in a system group.
And I am still completely lost about what we are getting using setConfigurationID.
-Laze |
|
Back to top |
|
 |
kriersd |
Posted: Fri Jan 17, 2003 10:10 am Post subject: |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
FMCGRP FMCSYS QM2 FMC
[/quote]
The example below is an example of a invalid configuration setup because you can not have multiple systems and or system groups with the same name under the same configuration. This is not possible.
Also, Workflow does not (yet) support multiple system groups running under a single configuration even if they were named unique.
Quote: |
You cannot have
FMC1
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMCGRP FMCSYS QM2 FMC
|
[/quote] _________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
kriersd |
Posted: Fri Jan 17, 2003 10:14 am Post subject: |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
Sorry folks.. I like to write my response in Outlook first then cut and past it into the window. Looks like I didn't get it all copied in my prior post.
Laze
I believe Vinny was simply showing two examples in his quote. First look at this quote. This is an example of two valid configuration settings. You don't have to have unique system and system group names because they exist within separate server configurations. The queue manager must be unique, however.
Quote: |
FMC1:
Connect Names
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMC2:
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM2 FMC
|
The example below is an example of a invalid configuration setup because you can not have multiple systems and or system groups with the same name under the same configuration. This is not possible.
Also, Workflow does not (yet) support multiple system groups running under a single configuration even if they were named unique.
Quote: |
You cannot have
FMC1
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMCGRP FMCSYS QM2 FMC
|
_________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
Ratan |
Posted: Fri Jan 17, 2003 10:41 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Dave, QM does not have to be unique( and should not be). If those configurations are talking to different runtime Databases then yes, you can have them.
Quote: |
Laze
I believe Vinny was simply showing two examples in his quote. First look at this quote. This is an example of two valid configuration settings. You don't have to have unique system and system group names because they exist within separate server configurations. The queue manager must be unique, however.
Quote:
FMC1:
Connect Names
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM1 FMC
FMC2:
SysGrp-- System-- QueueMgr Prefix--
FMCGRP FMCSYS QM2 FMC
|
-Laze |
|
Back to top |
|
 |
kriersd |
Posted: Fri Jan 17, 2003 11:28 am Post subject: |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
Laze
Your correct.. I was implying that there would be two separate DB in the above example, thus the requirement for two unique queue managers.
Although, I disagre with your comment.
Quote: |
QM does not have to be unique( and should not be). |
In my experience it would be best for you to create a second unique queue manager, one for each system. This would allow for faster processing and allow for more client connections, which is one of the reasons we use "Client Concentrators".
Dave _________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
Ratan |
Posted: Fri Jan 17, 2003 12:27 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Dave,
You are right. Sorry I misunderstood your previous reply to mean QM name can be same and wanted to say they cant be. I wrote it all wrong( my bad english).
-Laze |
|
Back to top |
|
 |
manoj |
Posted: Sat Jan 18, 2003 6:00 am Post subject: |
|
|
 Master
Joined: 30 Jan 2002 Posts: 237 Location: Virgina
|
i 've used setConfigId() in the following scenario.
I 've a client m/c which which has multiple MQ Workflow client configurations (say FMC1, FMC2, FMC3)which points to different MQWorkflow servers with different(or same) configuation ids (Note: My application doesn't 've to bother abt the config ids of the server , only the workflow client needs to know it) . In the code i will set the config id of a particular client (say FMC1 which points to a particular server configuration). By switching the config Ids of the clients i can connect to any server configuration. You should n't use agent.locate() method when using setConfigId() method _________________ -manoj |
|
Back to top |
|
 |
|