Hi

I have a few questions on EJB, CDI and Concurrency when I read
http://tomee.apache.org/examples-trunk/access-timeout/README.html, I read

- Concurrent access to a @Stateful bean is serialized by the container.

I also understand that I can annotate the EJBs with any of the CDI-scopes
(in my case I'm interested in @RequestScoped, @SessionScoped and
@ApplicationScoped).

Questions:

1. If I annotate the @Stateful bean with @RequestScoped I assume that I get
a separate bean instance for each call? Correct?
2. If I annotate the @Stateful bean with @SessionScoped I assume that I per
sesion get a separate bean instance that allows concurrent calls withing
that particular session without wait? Correct?
3. If I annotate the @Stateful bean with @ApplicationScoped I assume that I
per application get one bean instance that allows concurrent calls without
wait? Correct?

The reason I ask is that as far as I understand CDI does not have any
concurrency management but the EJB has. What will be the case when doing as
above?

Please help me get some in-depth understanding on this.

Thanks
Lars-Fredrik Smedberg



-- 
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsme...@gmail.com, and destroy all copies of this
message and any attachments.

Reply via email to