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 » WebSphere Message Broker (ACE) Support » Execute flow at Startup, Execute flow on Shutdown

Post new topic  Reply to topic
 Execute flow at Startup, Execute flow on Shutdown « View previous topic :: View next topic » 
Author Message
mickey1691
PostPosted: Wed Sep 25, 2013 12:07 am    Post subject: Execute flow at Startup, Execute flow on Shutdown Reply with quote

Novice

Joined: 04 Jun 2013
Posts: 19

Hi. Is there any way for a message flow to automatically execute on startup? Likewise, is there any way for a message flow to automatically execute on shutdown?

For example. on startup of the application, the app has send a message over tcp/ip to another application on another server that it has now started. It should receive and handle the reply from the other application.

Upon shutdown, it has to send another message to the same server that it is now shutting down. Like before, it should receive and handle the reply from the other application.

Thanks!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 25, 2013 1:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Sure, there are lots of ways this can be done.

Probably not as simply as you'd like, but there are lots of ways it can be done.

Also, it's an extremely terrible idea to have any system notify another system that it's available or unavailable like you're talking about. It makes them very interdependent and tightly coupled. This is bad.
Back to top
View user's profile Send private message
mickey1691
PostPosted: Wed Sep 25, 2013 1:43 am    Post subject: Reply with quote

Novice

Joined: 04 Jun 2013
Posts: 19

mqjeff wrote:

Also, it's an extremely terrible idea to have any system notify another system that it's available or unavailable like you're talking about. It makes them very interdependent and tightly coupled. This is bad.


That was just an example, not what we're going to implement.

mqjeff wrote:
Sure, there are lots of ways this can be done.

Probably not as simply as you'd like, but there are lots of ways it can be done.


I have some idea for the one during start up, but I have no idea how to implement the one for shutdown. Any suggestions?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Sep 25, 2013 1:50 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

mickey1691 wrote:


I have some idea for the one during start up, but I have no idea how to implement the one for shutdown. Any suggestions?


It is probably easier to send regular 'keep-alives' to this remote system then when you miss one it sounds the alarm.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 25, 2013 1:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I encourage both of you to think outside the box.

Or at least, outside the broker.
Back to top
View user's profile Send private message
sridhsri
PostPosted: Wed Sep 25, 2013 10:03 am    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

For startup, you can use the Timer Node. I can't remember the details, but you can have the TimerNode trigger an event when the message flow starts (with a long enough time interval so that it doesn't execute again until the next restart).
Back to top
View user's profile Send private message
Simbu
PostPosted: Wed Sep 25, 2013 8:46 pm    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

Subscribe to operational information. It will notify if message flows are Started and Stopped. Make use of these event messages to notify others.
Back to top
View user's profile Send private message
mickey1691
PostPosted: Wed Sep 25, 2013 10:26 pm    Post subject: Reply with quote

Novice

Joined: 04 Jun 2013
Posts: 19

Simbu wrote:
Subscribe to operational information. It will notify if message flows are Started and Stopped. Make use of these event messages to notify others.


Can I use this to execute a message flow upon shutdown?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Sep 25, 2013 11:41 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

If the flow is running on the same broker then my guess is NO you can't.
As I understand it, when you execute an 'mqsistop' the broker stops processing any new requests and waits for any existing threads to complete before really shutting down.

If you are sending the message to another Queue Manager/Broker system then there is no reason why you can't after all, it is just a message on a queue.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » WebSphere Message Broker (ACE) Support » Execute flow at Startup, Execute flow on Shutdown
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.