[windup-dev] GraphContext in CDI?
Ondrej Zizka
ozizka at redhat.com
Fri Feb 13 23:30:57 EST 2015
Hi,
I was playing with CDI, trying to inject GraphContext into
ArchiveIdentificationGraphChangedListener.
The original way to get it there is through constructor param.
So I changed is so it is passed by setter, for the purpose of this
experiment.
When I added @Inject GraphContext grCtx; it is injected something
different than what the setter gets. I.e. different instances.
So I conclude that this in GraphContextImpl
@Produces
@ApplicationScoped
public GraphContext produceGraphContext()
is not really giving something application scoped.
Why?
I know there's GraphContextFactory, but still - @Inject'ing
GraphContext, in the current setup, should IMO return the same
GraphContext - or not?
Thanks,
Ondra
More information about the windup-dev
mailing list