deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Porter <lightguard...@gmail.com>
Subject Re: Eager Instantiation
Date Tue, 16 Jul 2013 05:16:16 GMT
I'm going to have to disagree here, unless I'm mistaken, we don't have any
guarantee the CDI container will be fully booted when the ServletContext
events are fired. I don't see this as being a portable solution.


On Mon, Jul 15, 2013 at 10:58 PM, Christian Kaltepoth <
christian@kaltepoth.de> wrote:

> Hey Harald,
>
> I agree with John. Using the initialization event for the ServletContext
> could be an alternative for your. Have a look at this test case that shows
> how to observe the event:
>
>
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/context/ServletContextEventsObserver.java#L41
>
> Christian
>
>
>
> 2013/7/15 John D. Ament <john.d.ament@gmail.com>
>
> > Hi Harald,
> >
> > You can emulate this functionality using servlet events. See:
> >
> >
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeContextListener.java#L36
> >
> > Does this help you?  Unfortunately there's no easy way to do this with
> just
> > CDI.
> >
> > John
> >
> >
> > On Mon, Jul 15, 2013 at 12:02 PM, Harald Wellmann <
> hwellmann.de@gmail.com
> > >wrote:
> >
> > > Thanks for checking - I've created a feature request:
> > > https://issues.apache.org/jira/browse/DELTASPIKE-393
> > >
> > > Best regards,
> > > Harald
> > >
> > >
> > > 2013/7/15 Jason Porter <lightguard.jp@gmail.com>:
> > > > To my knowledge there isn't anything like that in the code base
> > > currently,
> > > > though what Dan has in that gist you mentioned would certainly be a
> > > simple
> > > > and portable solution.
> > > >
> > > >
> > > > On Mon, Jul 15, 2013 at 8:31 AM, Harald Wellmann <
> > hwellmann.de@gmail.com
> > > >wrote:
> > > >
> > > >> Does DeltaSpike include support for eager instantiation of
> > > >> @ApplicationScoped beans?
> > > >>
> > > >> E.g. like https://gist.github.com/mojavelinux/635719/
> > > >>
> > > >> The following discussion is related:
> > > >>
> > > >>
> > >
> >
> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/Startup-like-td4653932.html
> > > >>
> > > >> I'm just wondering if a solution has found its way into the codebase
> > > yet...
> > > >>
> > > >> Best regards,
> > > >> Harald
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Jason Porter
> > > > http://en.gravatar.com/lightguardjp
> > >
> >
>
>
>
> --
> Christian Kaltepoth
> Blog: http://blog.kaltepoth.de/
> Twitter: http://twitter.com/chkal
> GitHub: https://github.com/chkal
>



-- 
Jason Porter
http://en.gravatar.com/lightguardjp

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message