"abirkmanis" wrote : Also note that in case of eager injections (the current 
mechanizm) new ComponentA().doStuff() throws an NPE, which is hardly better.
Had getB() actually been abstract rather than "conceptually" abstract, the 
compiler wouldn't have even let you create an instance of new ComponentA().  
Maybe Seam could do some additional runtime error checking, but something that 
would have broken in the real world, still breaking in the conceptual world is 
hardly a shocker.

And even if you were to subclass ComponentA, things still wouldn't work because 
@In isn't inherited.

Seam components are first class concrete constructs.  I don't see a problem 
with a component's implementation extending an abstract class, but I don't see 
the value of an abstract component.  I do see the problems associated with 
trying to fake them though.

"abirkmanis" wrote : OTOH, componentAFactory.newInstance().doStuff() works fine.
Why not simply do something like this via @Factory or @Unwrap?  I'm trying to 
help, but don't see where this abstractness gets you anything but pain, now, 
and then later in testing.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3947285#3947285

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3947285


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to