 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
zbcong Guest
|
Posted: Tue Sep 02, 2003 10:27 am Post subject: must i synchronized the access to the STATEFUL session bean? |
|
|
hello
there is a class named "WebClientControllerImpl" in the petstore1.3,it is a proxy between the web tier and the ejb tier,in the statement,it tell me:
quote:
--------------------------------------------------------------------------------
all the method that access the ejb are synchronized,so that concurrent requests do not happen to the stateful session bean.
--------------------------------------------------------------------------------
why,i wonder if the access to the STATEFUL session bean must be synchronized?who can tell me?
thank you!
|
|
| Back to top |
|
 |
Kevin Dean Guest
|
Posted: Tue Sep 02, 2003 4:43 pm Post subject: Re: must i synchronized the access to the STATEFUL session b |
|
|
Taking the quote apart...
"all the method that access the ejb are synchronized"
This means that the client, not the EJB tier, is handling the
synchronization.
"so that concurrent requests do not happen to the stateful session bean"
Concurrent requests to a stateful session bean are expressly forbidden; you
cannot have two clients calling a single stateful session bean (they can
each call a different stateful session bean of the same type, but as they
are being served by different instances everything should be fine). If two
clients (or the same client with multiple threads) try to call the same
stateful session bean, the second one call will fail with an exception.
This does not apply to stateless session beans as the container will simply
create a second instance of the stateless session bean to service the second
call.
--
Check out our latest white papers at
http://www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
"zbcong" <zhebincong (AT) 163 (DOT) net> wrote
| Quote: |
hello
there is a class named "WebClientControllerImpl" in the petstore1.3,it is
a proxy between the web tier and the ejb tier,in the statement,it tell me:
quote:
--------------------------------------------------------------------------
------
all the method that access the ejb are synchronized,so that concurrent
requests do not happen to the stateful session bean.
--------------------------------------------------------------------------
------
why,i wonder if the access to the STATEFUL session bean must be
synchronized?who can tell me?
thank you!
|
|
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group .
|