jsr345-experts@ejb-spec.java.net

[jsr345-experts] EJB vs. CDI vs. JMS Features

From: Reza Rahman <reza_rahman_at_lycos.com>
Date: Fri, 17 Jun 2011 20:27:22 -0400

Folks,

I guess this is a question more for Marina and/or Pete as well as for
all of us collectively to ponder (and maybe the Java EE EG). As I
mentioned in my introductory email, there are a number of EJB-ish
features that I personally believe is a better fit for the CDI 1.1
and/or JMS 2 specifications. Here is a partial list of such features:

* Introducing the @TransactionScoped and @ThreadScoped CDI scopes geared
towards using back-end resources in a thread-safe manner in plain
managed beans.
* Introducing the @PoolScoped CDI scope as a way of providing the
equivalent of stateless session beans in plain managed beans.
Alternatively or in addition to, a @MaxActive annotation could be
introduced.
* Re-factoring Message Driven Beans to enable message receivers in plain
managed beans via CDI observers.
* Standardizing some common JMS activation properties as direct message
listener attributes.

Now, a lot of this hinges on successfully decoupling EJB transactions
from the component model. If we are reasonably confident that this will
happen and agree that these features really belong outside the EJB
specification, I'd like to bring them up ASAP in the CDI 1.1 and/or JMS
2 EGs. I thought it's only fair to check here first before I went down
that path too far...

What do we think?

Cheers,
Reza