You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Blevins <da...@visi.com> on 2008/06/30 23:22:52 UTC
Constructor injection
I added constructor injection for EJBs and Interceptors into OpenEJB.
We could probably do the same for servlets, filters and listeners if
we use xbean-reflect to create all of those.
The trick would be that the functionality wouldn't work unless they
compiled the code with debug. XBean uses the debug table to scrape
out the constructor param names. We could potentially add support of
the @java.beans.ParameterNames annotation, but that's only available
in Java 6.
Add it? Don't add it? Add it but put a big disclaimer on the doc for
it?
Thoughts?
-David
Re: Constructor injection
Posted by David Blevins <da...@visi.com>.
On Jul 1, 2008, at 7:25 AM, Jarek Gawor wrote:
> You mean @java.beans.ConstructorProperties?
That's the one. (memory was a bit stale)
> Also, why not create
> @org.apache.geronimo.xbean.ConstructorProperties or something like
> that and use that for constructor injection instead of relying on the
> debug info. It would also make the transition to
> @java.beans.ConstructorProperties easier in the future.
We could probably do something like that. XBean does have the ability
for the parameter names to be feed to it, rather than getting them
magically. So we could support something like this if we make a quick
check for the annotation ourselves. We could probably make our own
copy of @java.beans.ConstructorProperties and put it in a new spec jar
for java 5 usage.
-David
>
> On Mon, Jun 30, 2008 at 5:22 PM, David Blevins
> <da...@visi.com> wrote:
>> I added constructor injection for EJBs and Interceptors into
>> OpenEJB. We
>> could probably do the same for servlets, filters and listeners if
>> we use
>> xbean-reflect to create all of those.
>>
>> The trick would be that the functionality wouldn't work unless they
>> compiled
>> the code with debug. XBean uses the debug table to scrape out the
>> constructor param names. We could potentially add support of the
>> @java.beans.ParameterNames annotation, but that's only available in
>> Java 6.
>>
>> Add it? Don't add it? Add it but put a big disclaimer on the doc
>> for it?
>>
>> Thoughts?
>>
>> -David
>>
>>
>
Re: Constructor injection
Posted by Jarek Gawor <jg...@gmail.com>.
You mean @java.beans.ConstructorProperties? Also, why not create
@org.apache.geronimo.xbean.ConstructorProperties or something like
that and use that for constructor injection instead of relying on the
debug info. It would also make the transition to
@java.beans.ConstructorProperties easier in the future.
Jarek
On Mon, Jun 30, 2008 at 5:22 PM, David Blevins <da...@visi.com> wrote:
> I added constructor injection for EJBs and Interceptors into OpenEJB. We
> could probably do the same for servlets, filters and listeners if we use
> xbean-reflect to create all of those.
>
> The trick would be that the functionality wouldn't work unless they compiled
> the code with debug. XBean uses the debug table to scrape out the
> constructor param names. We could potentially add support of the
> @java.beans.ParameterNames annotation, but that's only available in Java 6.
>
> Add it? Don't add it? Add it but put a big disclaimer on the doc for it?
>
> Thoughts?
>
> -David
>
>