• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to utilize full efficiency of Java EE timers on clustered environment

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application which contains timers which will select 100 records from mysql table and process it and update those rows. The application is deployed on 2 nodes of clustered environment. The problem is both the
timers picks up the same 100 rows.

I want to utilize the efficiency of timers since both are running on different nodes. The 1st timer should picks up the first 100 records and the 2nd node timer should picks up next 100 records and so on. So that now same records are processed in different nodes.

I tried using pessimistic lock in the query in application but , i guess it will have some performance hit since the table contains millions of records.

Is there any better design to handle this problem or we can only use locks to do this.

 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic