• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling stored procedure asynchronously

 
Srinivas Rao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement in which a connection should made asynchronous call to stored procedure (which will contain to refresh a multiview in oracle). Why we need to make it asynchronous call is the refreshing will take few minutes for which we dont want the user to wait to get the success/fail message back.

Is there any way to make such call using normal JDBC stuff? As the refreshing is not compulsory (even refresh fails for some time, no problem), not preferring to go for JMS.

I heard that in ASP there is a way to made the command object as asnchronous connection. Is there any similar way using JDBC.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Srinivas Aluri:
I heard that in ASP there is a way to made the command object as asnchronous connection. Is there any similar way using JDBC.

No JDBC does not go into synchronous/asynchronous issues. You would have to use JMS or a thread. (Note that threads are not allowed if you are coming from an EJB.)
 
Karthik Banda
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a work around. Have a static class, that loads on startup of your application. Bind a static HashSet in that class and register your CallableStatement in it. So your application is only concerned about your registering your stored procedure. Have a thread polling on that HashSet and see if there are any new additions. once it finds the new addition, it simply execute it and remove it.
 
JuanP barbancho
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I see a JDBC driver that could "cache" tables and use batch load of them. I think that is very easy to use and it is J2EE.

Thanks

JuanP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic