wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes No concurrent calls on stateful beans exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "No concurrent calls on stateful beans exception" Watch "No concurrent calls on stateful beans exception" New topic
Author

No concurrent calls on stateful beans exception

Raymond Marfurt
Greenhorn

Joined: Oct 14, 2003
Posts: 2
Hi,
I use JBoss 3.2.1.
I have Web-Clients that create and access a stateful session bean. Now, when two instances of the Web-Clients access their corresponding session bean at exactly the same time, one of the two (the first caller) receives a "No concurrent calls on stateful beans" exception.
I understand that I can not access the *same* stateful bean concurrently, but in my case, I access different instances of the stateful bean. Why do I get this exception, and how can I prevent this?
Edward Kenworthy
Ranch Hand

Joined: Oct 05, 2003
Posts: 66
Do you create two instances of the session bean by calling the home interface's create() method twice like this:
MyBeanHome beanHome = MyBeanUtil.getHome(); // fyi xdoclet generated util
MyBean bean1 = managerHome.create();
MyBean bean2 = managerHome.create();
And then in two different threads you invoke bean1.dostuff() and bean2.dostuff ? Or do you call the same instance twice (bean1.dostuff() and bean1.dostuff())?
Edward
Raymond Marfurt
Greenhorn

Joined: Oct 14, 2003
Posts: 2
I have bean1 and bean2.
When I print out an instance variable of each bean, their values are different, so I really get two different instances with home.create().
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No concurrent calls on stateful beans exception