Skip to main content

SessionContext: inherently thread safe? Even in BMC Singleton?

No replies
ljnelson
Offline
Joined: 2003-08-04

Suppose I have a @Singleton session bean with a @Resource-injected
SessionContext. Suppose further my @Singleton session bean is annotated
with @ConcurrencyManagement(ConcurrencyManagementType.BEAN).

Must I synchronize access to the injected SessionContext? Or is it
inherently threadsafe?

In case it matters at all (I doubt it) I'm interested in calling the
getBusinessObject(Class) method only.

(For more background feel free to see
http://stackoverflow.com/questions/12028144/is-a-javax-ejb-sessioncontex...,
http://ljnelson.posterous.com/java-ee-compatible-abstractexecutorservice...
http://ljnelson.posterous.com/java-ee-compatible-abstractexecutorservice...
.)

Thanks in advance for any help you can provide.

Best,
Laird

--
http://about.me/lairdnelson