BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

must i synchronized the access to the STATEFUL session bean?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Enterprise
View previous topic :: View next topic  
Author Message
zbcong
Guest





PostPosted: Tue Sep 02, 2003 10:27 am    Post subject: must i synchronized the access to the STATEFUL session bean? Reply with 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
Kevin Dean
Guest





PostPosted: Tue Sep 02, 2003 4:43 pm    Post subject: Re: must i synchronized the access to the STATEFUL session b Reply with quote



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
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Enterprise All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group
.