Java Reference
In-Depth Information
Now that you have a grasp of concurrent programming with singleton beans, let's briefly
look at singleton session bean business interfaces.
3.4.5. Bean business interface
Singleton session beans have the same business interface capabilities as stateless session
beans. You can have remote, local, and web service (both SOAP and REST) business inter-
faces. Each of these three methods of accessing a singleton session bean is denoted using
the annotations @Local , @Remote , and @WebService , respectively. All three of these
interfaces are covered in section 3.2.5 .
The only real difference between singleton and stateless session bean business interfaces is
that you can annotate a singleton session bean interface's methods with the following an-
notations:
@Lock(LockType.READ)
@Lock(LockType.WRITE)
@AccessTimeout
All three of these annotations have an effect only if container-managed concurrency is be-
ing used; otherwise they have no effect. It's possible that the web service interface specifies
different concurrency behavior than the local interface (although this is unlikely). As is the
case with both stateless and stateful session beans, it isn't necessary to provide a local in-
terface.
Search WWH ::




Custom Search