update:
we put @IgnoreDependency on one side of the circular dependency as shown above.
our .ear gets deployed successfully and we didnt recognize any runtime error
yet.
we will have a look at it the next few days... but it seems to work : )
jaikiran, thank you very much for your first-aid ; )
(sorry for double posting, i cannot edit me previous post)
jaikiran, i have a last question...
@IgnoreDependency -what does it actually mean?
Ignore the dependency created by an injection annotation applied
sadly, that does not make it clear for me :- \
how could one explain it in a few words?
Whenever a @EJB is used, we internally add a micro container dependency on the
bean being injected. That way we ensure that the bean being injected is
available before the bean which uses the @EJB. With @IgnoreDependency, you can
override this behaviour so that the MC dependency is not created.
jaikiran wrote :
| That's correct.
|
i'm glad ; )
jaikiran wrote :
| Wouldn't this work:
|
| | public class StatlessTwoBean implements StatlessTwo {
| | @EJB(beanName = StatlessOne) // lookup always
| | @IgnoreDependency
| | private StatlessOne statlessOne;
|
anonymous wrote : but i cannot do that without class level annotations, right?
As far as i know, it's not possible to do this at class level.
anonymous wrote :
| so is there a solution to
|
| * ignore class level dependencies or
| * lazy inject field level dependencies ?
Can
you are always very fast, jaikiran :)
god bless you ; )
jaikiran wrote :
| As far as i know, it's not possible to do this at class level.
|
to do what at class level? to @IgnoreDependency?
jaikiran wrote :
| Can you please provide a bit more details about the issue you are running
anonymous wrote : to do what at class level? to @IgnoreDependency ?
|
Yes, i meant you can't have an @IgnoreDependency at class level.
anonymous wrote : i thought, that
|
| * @EJB on class level just declares a dependency and the application
server puts the corresponding ejb into