This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
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
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: No Concurrent Calls on Stateful Beans
 
Similar Threads
Instance pooling
Home & Remote interface
No concurrent calls on stateful beans exception
concurrent access of session ejbs
Connection Pooling in stateful EJB beans