• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

clustered environment doubt

 
Ranch Hand
Posts: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Rancher
Posts: 4804
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic