Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need urgent help: how to avoid concurrent calls on statefull session beans

843829May 11 2003 — edited May 17 2003
Hi,

I need a little advice in designing a EJB session facade using JSPs, servlets, session and
entity beans.

My current design is:

- JSP pages: here are only getMethods for the session bean used. All set-methods are handled by a
- servlet: I have got one servlet handling several JSP pages. The servlet basically takes the
form fields and stores them in the session bean and than dispatches to the next JSP-page
- stateful session bean: here is, where all the business logic is conducted. There is one session
bean per servlet using several
- CMP entity beans: to talk to the database (Oracle 8i)

The application server is JBoss 3.0.3.

My problem is, if a user clicks on a submit button of a JSP page more than once before the next
page builds up, I may get a "javax.ejb.EJBException: Application Error: no concurrent calls on
stateful beans" error. I already synchronized (by the "session") the code in the servlet, but
it happens in the JSP pages as well.

I know, that Weblogic is able to handle concurrent calls, by JBoss isn't and it's clearly stated
in the spec, that a user should avoid to have concurrent calls to a stateful bean.

The big question is now: How can I avoid this? How can I prohibit the user to submit a form several
times or to ignore anything, which arrives after the first submit?

Thanks for any help,

Thorsten.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2003
Added on May 11 2003
3 comments
188 views