• Post Reply Bookmark Topic Watch Topic
  • New Topic

Wait notify in weblogic  RSS feed

 
Victor Grazi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that you can't spin your own threads in an EJB. However is there any prohibition against calling wait on some mutex, while another process completes, and then having that process call notify? The objective is that the original method should not return to the client until the notify is called (or it times out)
Thanks/Victor
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These actions are also prohibited in the EJB Specification and could cause serious issues in an Application Server environment. A better solution would be to use JMS for these types of problems. The client can send a JMS Message to the Server and then then wait for a response on a specified Queue or Topic. It would then be up to the client to either block for that response or to setup an asynchronous message listener. This type of solution actually adds quite a bit of flexibility to the design.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!