|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to define a service |
« View previous topic :: View next topic » |
Author |
Message
|
jim |
Posted: Thu Aug 07, 2014 1:42 am Post subject: How to define a service |
|
|
Voyager
Joined: 26 Nov 2013 Posts: 94
|
How to define a MQ service which can call two command in startcmd ?
STARTCMD(' ')
STARTARG('')  |
|
Back to top |
|
 |
exerk |
Posted: Thu Aug 07, 2014 1:54 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
jim |
Posted: Thu Aug 07, 2014 2:04 am Post subject: |
|
|
Voyager
Joined: 26 Nov 2013 Posts: 94
|
exerk wrote: |
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...  |
I know that ..My question is Can I provide two command in this arguement STARTCMD |
|
Back to top |
|
 |
exerk |
Posted: Thu Aug 07, 2014 2:17 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
jim wrote: |
exerk wrote: |
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...  |
I know that ..My question is Can I provide two command in this arguement STARTCMD |
My question is, why would you want to? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
jim |
Posted: Thu Aug 07, 2014 3:13 am Post subject: |
|
|
Voyager
Joined: 26 Nov 2013 Posts: 94
|
exerk wrote: |
jim wrote: |
exerk wrote: |
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...  |
I know that ..My question is Can I provide two command in this arguement STARTCMD |
My question is, why would you want to? |
I just need to restart the one of my component So Iam thinking of writing stop cmd and start cmd in STARTCMD attibute  |
|
Back to top |
|
 |
exerk |
Posted: Thu Aug 07, 2014 3:23 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
From the IBM example:
Code: |
STARTCMD('C:\Program Files\IBM\Websphere MQ\bin\runmqtrm') +
STARTARG('-m +QMNAME+ -q MY.INITQ') +
STOPCMD('C:\Program Files\IBM\Websphere MQ\bin\amqsstop') +
STOPARG('-m +QMNAME+ -p +MQ_SERVER_PID+') + |
Stopping and starting the Service is then achieved using the appropriate command, so a 'restart' would be done that way. Or is that you specify STARTONLY in your definition? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 07, 2014 5:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
jim wrote: |
exerk wrote: |
jim wrote: |
exerk wrote: |
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...  |
I know that ..My question is Can I provide two command in this arguement STARTCMD |
My question is, why would you want to? |
I just need to restart the one of my component So Iam thinking of writing stop cmd and start cmd in STARTCMD attibute  |
Right, so. The service object under the covers ends up doing some kind of process start command, which ends up being equivalent to the same thing you do when you type something into a command prompt on the system and then hit the enter key.
So you can either figure out how to write something that runs both commands from a command prompt, with you only hitting enter once... or you can write a shell script that does both commands, using the normal shell scripting language for your platform.
If you want to be a good MQ administrator, you also need to be a good system administrator for the platforms running MQ. |
|
Back to top |
|
 |
jim |
Posted: Fri Aug 08, 2014 7:08 am Post subject: |
|
|
Voyager
Joined: 26 Nov 2013 Posts: 94
|
mqjeff wrote: |
jim wrote: |
exerk wrote: |
jim wrote: |
exerk wrote: |
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...  |
I know that ..My question is Can I provide two command in this arguement STARTCMD |
My question is, why would you want to? |
I just need to restart the one of my component So Iam thinking of writing stop cmd and start cmd in STARTCMD attibute  |
Right, so. The service object under the covers ends up doing some kind of process start command, which ends up being equivalent to the same thing you do when you type something into a command prompt on the system and then hit the enter key.
So you can either figure out how to write something that runs both commands from a command prompt, with you only hitting enter once... or you can write a shell script that does both commands, using the normal shell scripting language for your platform.
If you want to be a good MQ administrator, you also need to be a good system administrator for the platforms running MQ. |
Yes. We can do by writing a script but I need to place that on the server so I want option to place the two cmd in the STARTCMD attribute.  |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 08, 2014 7:24 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
jim wrote: |
Yes. We can do by writing a script but I need to place that on the server so I want option to place the two cmd in the STARTCMD attribute.  |
Well. Open up a command prompt. Type in the two commands on one line, such that you don't have to hit enter.
Fiddle with that until it works.
Put that in STARTCMD.
STARTCMD does nothing magical. It just runs a shell.  |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Aug 08, 2014 8:11 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Perhaps a command separator character. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|