• Post Reply Bookmark Topic Watch Topic
  • New Topic

clustered environment doubt  RSS feed

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In a clustered environment...hw can we control that the execution of a certain operation happens in only one of the cluster nodes??

Regards
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What triggers your operation? I guess I'm wondering if it is startup or a user request.

We named each clone in a cluster with a WebSphere environment variable configured for each clone, and had a process that checked for name "MyApp01" at startup. The other clones failed the test and returned. Is that anywhere near what you need?
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually the requirement is to send out a mail at a predestined time..
taking data from a file...

And the program executes in all the nodes and mails are duplicated...
 
Pat Farrell
Rancher
Posts: 4686
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simple approach is just to have a cron job kick off at the appropriate time, run a little java app that calls the server to do what you want.

You may want to put a one record, two field database that is shared, when you start the process, change the "inUse" field to true, do the work, and then clear it. Have all the code check with synchronization the database. Then update the "date processed" to the current time, or to the next time you want it run.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!