GeeCON Prague 2014*
The moose likes EJB and other Java EE Technologies and the fly likes No Concurrent Calls on Stateful Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "No Concurrent Calls on Stateful Beans" Watch "No Concurrent Calls on Stateful Beans" New topic
Author

No Concurrent Calls on Stateful Beans

Jeff Storey
Ranch Hand

Joined: Oct 09, 2006
Posts: 118
I have some stateful beans that do a large amount of processing and I want to be able to cancel the processing by setting a cancel flag. The problem is that if I call the "cancel" method on the bean while it is processing, I get an error saying no concurrent calls on stateful beans. I could set up a JMS topic that the bean listens to and periodically checks for cancelling, but that requires the topic to already be setup and reduces the flexibility of the bean. Is there another way to set the flag in this bean without getting this exception? Also, as a follow up question, if this bean stores a variable that represents the cancel flag, does that also mean it must be stateful since that variable must be remembered?

Thanks,
Jeff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No Concurrent Calls on Stateful Beans