Hi,
I don't know if this is the palce but after reading all 4 parts of the sneak peak of
Web Beans, here's a couple of comments/questions I would like share.
@Named annotation
I know that this has also been raise about Seam but would it be possible to remove that
annotation and use the value() of the @Component annotation or add a "name"
attribute to it instead? I found it would be more meaningful this way. Or maybe the
@Named attribute has other uses which requires it to be separate?
Injection on resolver method
In the example that you give in part 4 about how to use injection in resolver method,
wouldn't it be better to instantiate the component through the Web Beans API instead
of having the container inject 3 values and in the end only using one of them? Something
like:
| @Resolves @Preferred @ApplicationScoped
| public PaymentStrategy getPaymentStrategy() {
| switch (paymentStrategy) {
| case CREDIT_CARD: return
container.methodToInjectBean("whatevertheparamshouldbe");
| case CHEQUE:
container.methodToInjectBean("whatevertheparamshouldbe");
| case PAYPAL:
container.methodToInjectBean("whatevertheparamshouldbe");
| default: return null;
| }
| }
|
Again, I understand it was maybe only to showcase the possibility and not necessarily the
only work around to this problem but I was just curious if it would be the preferred way
to address this situation.
Integreation in Seam
It probably is too soon to discuss this but are there any plans to replace Seam's
component model with Web Beans? I know that some features/behaviour of the Seam component
model might be missing from the Web Beans specification but is the ultimate goal the one
day use it in Seam?
Thanks for sharing this preview of the specification with us.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089336#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...