This content has been marked as final.
Show 4 replies
-
1. Re: Injection when using abstract parent class
pmuir Feb 10, 2007 7:32 AM (in response to gmanwani)Please post using [ code ] tags. Assuming Foo is a seam component, bijection will take place on it and it's superclasses.
-
2. Re: Injection when using abstract parent class
gmanwani Feb 10, 2007 2:10 PM (in response to gmanwani)Sorry about the missing the code tags! My bad, here is my setup
Foo is not really a Seam component but I make it available through the Seam manager pattern. SeamComp1 is a typical JavaBean seam component with Name and Scope(EVENT) annotations.public abstract AbstractFoo { @In private SeamComp1 seamcomp1; init() { seamcomp1.getSomething(); } } public Foo extends AbstractFoo { public Foo() { init(); } } @Name("foo") @Scope(EVENT) public class FooMgr { @Unwrap public Foo getFoo() { return new Foo(); } }
Hope my setup is clear.
Thanks in advance for all the help! -
3. Re: Injection when using abstract parent class
pmuir Feb 10, 2007 5:17 PM (in response to gmanwani)In this case seamcomp1 will never be bijected (you cannot use Seam to inject into something that isn't a Seam component).
-
4. Re: Injection when using abstract parent class
gmanwani Feb 12, 2007 10:14 PM (in response to gmanwani)I have made Foo a Seam component but I do not see the injection happening. On the contrary if I have an init() method in the derived class and apply the @Create annotation to it then the injection does take place.
This looks like a bug to me.