• 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

Adding new Callback method to MDB

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

I am new to EJB .I am stuck in a scenario. I am explaining the scenario below :

We have a very big resultset having nearly 1027826 records. And we have to process all the records.After processing the records we have to update the status in the database table against the records.And we have to update another table with the status that all the records under this Id have been processesed. So we will have two tables first one Master table having Id and status and second one Chile table having all the child records against the id from the master table.Now if some thing fails then we have to reprocess entire records again.


My approach is to read all the records from database .Iterate over the resultset .Create group of records on the basis of some common fields and then we will pass the groups in form of message to a Message Drive Bean for processging.Our main thread will keep on waiting till all the groups have been processed .Once processing is done we will update the database record. Now to update the master table we have to first confirm that all the child records have been processed i.e 1027826 records .


For this can we have a callback method that our JMS will invoke so that we can notify the main thread(waiting thread) that all the records has been updated.We can put some logic there that all the records have been updated and then we will update master table.

My query is can we add our own callback method with MDB and how to do it.

Thanks
Amar


 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question has nothing to do with Swing. Please take some efforts while posting to ensure you post in the proper forum.
http://faq.javaranch.com/java/CarefullyChooseOneForum
 
amar nath jha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ohh I am sorry I posted it in swing forum will take care of this in future
 
reply
    Bookmark Topic Watch Topic
  • New Topic