users@ejb-spec.java.net

[ejb-spec users] Re: Question reg Singleton Session Bean Concurrency

From: Reza Rahman <reza.rahman_at_oracle.com>
Date: Mon, 05 Jan 2015 10:08:36 -0500

What that text means is that the client can expect that the bean will
always be accessed in a thread safe way when there is concurrent access
attempts by other clients.

On 1/5/2015 10:00 AM, Abhishek Gupta wrote:
> Hello !
>
> I have a question regarding the contents of */Section 4.8.5 -
> Singleton Session Bean Concurrency
> /*
> The first couple of lines state that - /[quote] From the client’s
> perspective, a singleton session bean always supports concurrent
> access. In general, the client of a singleton session bean does not
> have to concern itself with whether other clients might be accessing
> the singleton session bean at the same time. [/quote]
> /
> As a bean provider, one might choose to prevent concurrent access
> altogether by using a combination of Container Managed Concurrency
> (/ConcurrencyManagementType.CONTAINER/) and Write lock
> (/LockType.WRITE/). The methods might continue to block until the
> client receives a ConcurrentAccessTimeoutException.
>
> *Question *- Is it correct to state that /[quote] From the client’s
> perspective, a singleton session bean always supports concurrent
> access[/quote]/ when its obvious that there are valid ways of
> preventing this at the bean provider level ?
>
> Sorry if this sounds like a noob question, but the statement did not
> seem very obvious at first glance - hence the query.
>
> Regards
> Abhishek