• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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.
 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic