Sure, just needed to get a few checkins done first....
Basically, it's a start of the proposal some chump did here ;-) :
http://wiki.apache.org/ws/Tuscany/SpecProposals/Constructors
Seriously, as background, the spec group recently approved support
for injecting properties and references using constructors in the SCA
Java C&I spec. I've updated the spec based on the proposal (basically
verbatim) and hopefully we will have a rev of the specs with the
composite support, etc. very soon (within the next couple of weeks).
The support I have in there right now is basic and is still
preliminary (i.e. not well-tested):
- Support for @Constructor
- If one constructor exists, support for mapping parameters to
properties and references heuristically
What I don't have yet is:
- Support for choosing a constructor if more than one exists and
mapping parameters to properties and references heuristically
- Handling cyclic references
I've checked in a simple (temporary) sample called local.wire.cdi
which demonstrates how the runtime can "automagically" select a
single constructor and map it to a reference as in:
public SourceImpl(Target target) {
this.target = target;
}
In this case, the runtime will inject the reference "target" when
SoruceImpl is instantiated. One of the good things is the sample is
almost exactly the same as local.wire except for SourceImpl's
constructor. Specifically, the wiring in the SCDL is the same,
indicating that we have a level of decoupling between SCDL and the
shape of the implementation.
Jim
On Jul 14, 2006, at 9:32 AM, Jeremy Boynes wrote:
On Jul 14, 2006, at 8:38 AM, [EMAIL PROTECTED] wrote:
Author: jmarino
Date: Fri Jul 14 08:38:24 2006
New Revision: 421926
URL: http://svn.apache.org/viewvc?rev=421926&view=rev
Log:
initial commit for constructor injection support; not yet fully
complete
Could you give a quick summary of what this means e.g. what works
and what's not complete?
Thanks
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]