[webbeans-dev] Constructor Parameter Injection
Gurkan Erdogdu
gurkanerdogdu at yahoo.com
Fri Jan 16 16:40:40 EST 2009
Hi;
In today, as far as I understand from the XML chapter of the specification , there is no support for the primitive/wrapper injection into the constructor parameter via XML decleration like this.
<myapp : BeanTest>
<lang:Integer>42</lang:Integer>
</myapp:BeanTest>
for bean class
class BeanTest
{
private int param;
public BeanTest(int param)
{
this.param = param;
}
}
For example, when the bean is instantiated by the container, it injects the *param* parameter as 42. Currently there is only way to the this via @Initializer method.
I think this is important, because lots of old codes may be benefited from the webbeans without touching their codes.
/Gurkan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20090116/20952cb8/attachment.html
More information about the weld-dev
mailing list