-
1. Re: Using @In to inject a reference to a bean in a different
thejavafreak Dec 25, 2007 9:02 PM (in response to eoinbyrne)Have you annotated your bean B with @Name yet?
During initialization Seam will make beans with @Name as components and you should be able to inject it eventhough it is on several jars. Although I havent been in your situation before and haven't tried it yet. -
2. Re: Using @In to inject a reference to a bean in a different
eoinbyrne Jan 2, 2008 5:09 AM (in response to eoinbyrne)Sorry for the late responce - just got back from the holiday break.
I have both beans annotated with @Name however the pojo is not. Looking over the initial post it looks a little cryptic so I'll try to clarify it a little
In Jar A:
Pojo containing common code
Bean 1 - Stateless Bean using the @Name annotation
In Jar B:
Bean 2 extends Pojo - its stateful and named, it contains an instance var (Bean 1) which is injected using the @In annotation but the refrence is null at runtime.
Initially everything was in one jar and Bean 2 was stand alone and it worked fine but now I'd like to seperate out some of the common stuff so I can reuse it in another project.
From what I can see in the documentation what I am trying to do should work fine, both beans should be in the same application scope because they are both living in the same ear file.