• 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

design issue

 
Ranch Hand
Posts: 399
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We have a requirement where the IBM Websphere Application server scheduler need to query the database to get the most current record from table ABC.

What is a good design practice to implementing the logic to query the table.

Our current approach is to use the EJB which will query the tabel and return the result. our concern is that the scheduler will have to lookup the EJB every 5 seconds and then query the DB.

Appreciate all the inputs on these.

Thank you.

Ayub
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Applications that is updating the table can send a message to your application when they create a new record instead of keep looking for new records at your own in the DB. You can than store the message and treat it as most recent record in DB until next message arrives.
 
Ayub ali khan
Ranch Hand
Posts: 399
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Satyendra, what you mentioned is one more alternative. I appreciate if I could get any more ideas on this...


Thank you.

Ayub.
 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think changing an unknown number of applications is a good solution.

Separation of Concerns: it is not these applications responsibility to tell WebSphere that the database is updated.

I would suggest either letting the database itself, or a small application outside WebSpher, put a message on a designated queue whenever the table is updated. Then, create a listener on that queue, which tell WebSphere that the table is updated whenever a message is received. This listener could be an MDB (message-driven EJB), or not - depending on what is to happen when the table is updated.
 
Fire me boy! Cool, soothing, shameless self promotion:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic