Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding new Callback method to MDB  RSS feed

 
amar nath jha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • 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


 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Ohh I am sorry I posted it in swing forum will take care of this in future
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!