• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

call to procedure stops java application till procedure gets executed.

 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement to execute a procedure from a java application.
This procedure would take 20-30 minutes to execute. My application will stops till my procedure gets executed.

I don't my application to wait for my procedure to cpomplete its execution.

Is there any way/logic using which I can make this happen.
I don't want to use threads for the above mentioned.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could make it asynchronous via JMS. That is if your business needs can handle it. That being said, unless your procudure is doing admin-type tasks (archiving a bunch of data, report building etc. ) then I reckon it might be doing more then it should - since 20-30 mins. is an awful long time for a procedure to run.
 
Kishore Nair
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also do an Observer/Observable model with your stored proc call in a separate thread which is an observable and the main app as an observer. When the proc is complete, you can use "notify" to tell the Observer that the thread is done.
 
Kishore Nair
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops didn't see the "I don't want to use threads" part.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34656
365
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to EJB and Other J2EE Technologies since this is not specific to JDBC
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic