Dan, there are two things here. There is what is defined for Java EE
by CDI and other specs and what Weld supports outside of EE, which by
definition is not defined by the specs.
Sent from my iPhone
On Nov 24, 2009, at 3:56 PM, Dan Allen <dan.j.allen(a)gmail.com> wrote:
Yep, the spec states:
'In a Java EE implementation, a Managed Bean may use any of the
resource injection functionality laid out in Chapter 5 of the Java
EE Platform specification, “Resources, Naming and Injection“.'
Hmm, but the trouble is, where does that leave Tomcat and Jetty? And
if the resource like the persistence context or UT is to be
injected, who is doing the injecting? Of course, if EJB lite were
present, it could handle it.
So basically, what I'm getting at is that perhaps CDI can provide
this transaction and persistence support (maybe even the resource
injection) when the Java EE environment is not present (meaning EJB
lite is also absent).
Of course, we can prototype this as a portable extension today. I'm
certainly not opposed to that. But I would hope if we did, the long
term goal would be to somehow provide this in Java EE lite.
I understand this argument is circular, because eventually you
arrive back at the question "why not just make them use Java EE?"
The idea is to attract developers to Java EE by giving them one more
stepping stone.
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen