• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

No concurrent calls on stateful beans exception

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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().
 
Would you like to try a free sample? Today we are featuring tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic