You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2012/10/16 08:23:16 UTC

@Startup like?

Hi guys,

after a talk with Charles i wonder if we couldn't add a kind of
@Startup/@LoadOnStartup  feature to DS.

The idea could be to for the init of some bean with the last cdi event at
startup.

It could be used to force some init in standalone (cdictrl) or without
being dependent of the environment (JSE, JEE, Web...)

wdyt?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*

Re: @Startup like?

Posted by Mark Struberg <st...@yahoo.de>.
We could easily fire it in CdiCtrl. 
We could also easily fire it in JSF environments. 

Not sure about Servlet only stuff as we dont have the ContextInitialized order under our control.

We could allow users to fire that event if they know what to do.

There is a feature request to EE since 4 years about such a general 'server is started' callback. Till now it got completely ignored.


LieGrue,
strub



----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: deltaspike-dev@incubator.apache.org
> Cc: 
> Sent: Tuesday, October 16, 2012 8:23 AM
> Subject: @Startup like?
> 
> Hi guys,
> 
> after a talk with Charles i wonder if we couldn't add a kind of
> @Startup/@LoadOnStartup  feature to DS.
> 
> The idea could be to for the init of some bean with the last cdi event at
> startup.
> 
> It could be used to force some init in standalone (cdictrl) or without
> being dependent of the environment (JSE, JEE, Web...)
> 
> wdyt?
> 
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: 
> **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
> 

Re: @Startup like?

Posted by Charles Moulliard <ch...@gmail.com>.
+1

I completely agree with you to have CDI equivalent in DeltaSpike project.
That will avoid to add a

-Java Main class to boot the project

or like in weld - OSGI

- something like this


@Singleton
public class MainApp {


    public void onStartup(@Observes
BundleContainerEvents.BundleContainerInitialized event) {
   ...
 }

    public void onShutdown(@Observes
BundleContainerEvents.BundleContainerShutdown event) {
...
    }

}

Regards,

Charles

On Tue, Oct 16, 2012 at 8:23 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> Hi guys,
>
> after a talk with Charles i wonder if we couldn't add a kind of
> @Startup/@LoadOnStartup  feature to DS.
>
> The idea could be to for the init of some bean with the last cdi event at
> startup.
>
> It could be used to force some init in standalone (cdictrl) or without
> being dependent of the environment (JSE, JEE, Web...)
>
> wdyt?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

Re: @Startup like?

Posted by Jason Porter <li...@gmail.com>.
I'm with Mark on this one. In CDICTRL we can do this easily. With JSF we
can do it, with Servlets, it's pretty much hit and miss. If we can do it
reliably across the board should we do it at all?

On Tue, Oct 16, 2012 at 6:41 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> the point is you generally attach the startup bean to the framework it is
> linked to. When you don't have any framework what do you use in a lib
> (based on cdi)?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
>
> 2012/10/16 Rudy De Busscher <rd...@gmail.com>
>
> > There are indeed all kind of other scenarios of @startup where you need
> > JSF.  I have used it already to overwrite some standard JSF converters.
> >
> > Rudy
> >
> > On 16 October 2012 13:37, Gerhard Petracek <gerhard.petracek@gmail.com
> > >wrote:
> >
> > > there are several requirements which aren't related to a db...
> > > (in most cases such functionality gets triggered during the first
> > request.
> > > that's currently the only workaround which works for all constellations
> > > i've seen so far.)
> > >
> > > regards,
> > > gerhard
> > >
> > >
> > >
> > > 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> > >
> > > > hmm,
> > > >
> > > > not in @Startup
> > > >
> > > > let think to a database provisionning using the DS datasources
> > > >
> > > > *Romain Manni-Bucau*
> > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > > http://rmannibucau.wordpress.com/>
> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > *Github: https://github.com/rmannibucau*
> > > >
> > > >
> > > >
> > > >
> > > > 2012/10/16 Mark Struberg <st...@yahoo.de>
> > > >
> > > > >
> > > > >
> > > > > Yes it works fine if you only need EJB stuff, but in Extensions you
> > > > pretty
> > > > > often need to interact with other frameworks
> > > > >
> > > > > LieGrue,
> > > > > strub
> > > > >
> > > > > >________________________________
> > > > > > From: Romain Manni-Bucau <rm...@gmail.com>
> > > > > >To: deltaspike-dev@incubator.apache.org; Mark Struberg <
> > > > struberg@yahoo.de
> > > > > >
> > > > > >Sent: Tuesday, October 16, 2012 12:01 PM
> > > > > >Subject: Re: @Startup like?
> > > > > >
> > > > > >
> > > > > >That's not an issue IMO,
> > > > > >
> > > > > >
> > > > > >Personally i abuse of it to initialize stuff wich is needed later
> > but
> > > > not
> > > > > linked to any other spec
> > > > > >
> > > > > >
> > > > > >Romain Manni-Bucau
> > > > > >Twitter: @rmannibucau
> > > > > >Blog: http://rmannibucau.wordpress.com/
> > > > > >LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > > > > >Github: https://github.com/rmannibucau
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >2012/10/16 Mark Struberg <st...@yahoo.de>
> > > > > >
> > > > > >
> > > > > >>
> > > > > >>@Startup is perfectly broken as well. Read 4.8.1
> > > > > >>
> > > > > >>" 4.8.1 Singleton Initialization ...the container must initialize
> > the
> > > > > Singleton bean
> > > > > >>instance during the application startup sequence...."
> > > > > >>
> > > > > >>
> > > > > >>It does NOT define whether other parts of the container must
> > already
> > > be
> > > > > available. I've noticed that @Startup beans get initialized
> _before_
> > > the
> > > > > JSF container is fully booted.
> > > > > >>
> > > > > >>
> > > > > >>What is missing is a general startup order for EE containers.
> > > Including
> > > > > events.
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>LieGrue,
> > > > > >>strub
> > > > > >>
> > > > > >>----- Original Message -----
> > > > > >>
> > > > > >>> From: Jean-Louis MONTEIRO <je...@gmail.com>
> > > > > >>> To: deltaspike-dev@incubator.apache.org
> > > > > >>> Cc:
> > > > > >>
> > > > > >>> Sent: Tuesday, October 16, 2012 9:20 AM
> > > > > >>> Subject: Re: @Startup like?
> > > > > >>>
> > > > > >>> Basically, what has been defined for Singleton beans (@Startup
> > and
> > > > > >>> @DependsOn)?
> > > > > >>>
> > > > > >>> Jean-Louis
> > > > > >>>
> > > > > >>> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> > > > > >>>
> > > > > >>>>  Hi guys,
> > > > > >>>>
> > > > > >>>>  after a talk with Charles i wonder if we couldn't add a kind
> of
> > > > > >>>>  @Startup/@LoadOnStartup  feature to DS.
> > > > > >>>>
> > > > > >>>>  The idea could be to for the init of some bean with the last
> > cdi
> > > > > event at
> > > > > >>>>  startup.
> > > > > >>>>
> > > > > >>>>  It could be used to force some init in standalone (cdictrl)
> or
> > > > > without
> > > > > >>>>  being dependent of the environment (JSE, JEE, Web...)
> > > > > >>>>
> > > > > >>>>  wdyt?
> > > > > >>>>
> > > > > >>>>  *Romain Manni-Bucau*
> > > > > >>>>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > > >>>>  *Blog: **http://rmannibucau.wordpress.com/*<
> > > > > >>>>  http://rmannibucau.wordpress.com/>
> > > > > >>>>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > > >>>>  *Github: https://github.com/rmannibucau*
> > > > > >>>>
> > > > > >>>
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

Re: @Startup like?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
the point is you generally attach the startup bean to the framework it is
linked to. When you don't have any framework what do you use in a lib
(based on cdi)?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*




2012/10/16 Rudy De Busscher <rd...@gmail.com>

> There are indeed all kind of other scenarios of @startup where you need
> JSF.  I have used it already to overwrite some standard JSF converters.
>
> Rudy
>
> On 16 October 2012 13:37, Gerhard Petracek <gerhard.petracek@gmail.com
> >wrote:
>
> > there are several requirements which aren't related to a db...
> > (in most cases such functionality gets triggered during the first
> request.
> > that's currently the only workaround which works for all constellations
> > i've seen so far.)
> >
> > regards,
> > gerhard
> >
> >
> >
> > 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> >
> > > hmm,
> > >
> > > not in @Startup
> > >
> > > let think to a database provisionning using the DS datasources
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > http://rmannibucau.wordpress.com/>
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > >
> > > 2012/10/16 Mark Struberg <st...@yahoo.de>
> > >
> > > >
> > > >
> > > > Yes it works fine if you only need EJB stuff, but in Extensions you
> > > pretty
> > > > often need to interact with other frameworks
> > > >
> > > > LieGrue,
> > > > strub
> > > >
> > > > >________________________________
> > > > > From: Romain Manni-Bucau <rm...@gmail.com>
> > > > >To: deltaspike-dev@incubator.apache.org; Mark Struberg <
> > > struberg@yahoo.de
> > > > >
> > > > >Sent: Tuesday, October 16, 2012 12:01 PM
> > > > >Subject: Re: @Startup like?
> > > > >
> > > > >
> > > > >That's not an issue IMO,
> > > > >
> > > > >
> > > > >Personally i abuse of it to initialize stuff wich is needed later
> but
> > > not
> > > > linked to any other spec
> > > > >
> > > > >
> > > > >Romain Manni-Bucau
> > > > >Twitter: @rmannibucau
> > > > >Blog: http://rmannibucau.wordpress.com/
> > > > >LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > > > >Github: https://github.com/rmannibucau
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >2012/10/16 Mark Struberg <st...@yahoo.de>
> > > > >
> > > > >
> > > > >>
> > > > >>@Startup is perfectly broken as well. Read 4.8.1
> > > > >>
> > > > >>" 4.8.1 Singleton Initialization ...the container must initialize
> the
> > > > Singleton bean
> > > > >>instance during the application startup sequence...."
> > > > >>
> > > > >>
> > > > >>It does NOT define whether other parts of the container must
> already
> > be
> > > > available. I've noticed that @Startup beans get initialized _before_
> > the
> > > > JSF container is fully booted.
> > > > >>
> > > > >>
> > > > >>What is missing is a general startup order for EE containers.
> > Including
> > > > events.
> > > > >>
> > > > >>
> > > > >>
> > > > >>LieGrue,
> > > > >>strub
> > > > >>
> > > > >>----- Original Message -----
> > > > >>
> > > > >>> From: Jean-Louis MONTEIRO <je...@gmail.com>
> > > > >>> To: deltaspike-dev@incubator.apache.org
> > > > >>> Cc:
> > > > >>
> > > > >>> Sent: Tuesday, October 16, 2012 9:20 AM
> > > > >>> Subject: Re: @Startup like?
> > > > >>>
> > > > >>> Basically, what has been defined for Singleton beans (@Startup
> and
> > > > >>> @DependsOn)?
> > > > >>>
> > > > >>> Jean-Louis
> > > > >>>
> > > > >>> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> > > > >>>
> > > > >>>>  Hi guys,
> > > > >>>>
> > > > >>>>  after a talk with Charles i wonder if we couldn't add a kind of
> > > > >>>>  @Startup/@LoadOnStartup  feature to DS.
> > > > >>>>
> > > > >>>>  The idea could be to for the init of some bean with the last
> cdi
> > > > event at
> > > > >>>>  startup.
> > > > >>>>
> > > > >>>>  It could be used to force some init in standalone (cdictrl) or
> > > > without
> > > > >>>>  being dependent of the environment (JSE, JEE, Web...)
> > > > >>>>
> > > > >>>>  wdyt?
> > > > >>>>
> > > > >>>>  *Romain Manni-Bucau*
> > > > >>>>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > >>>>  *Blog: **http://rmannibucau.wordpress.com/*<
> > > > >>>>  http://rmannibucau.wordpress.com/>
> > > > >>>>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > >>>>  *Github: https://github.com/rmannibucau*
> > > > >>>>
> > > > >>>
> > > > >>
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: @Startup like?

Posted by Rudy De Busscher <rd...@gmail.com>.
There are indeed all kind of other scenarios of @startup where you need
JSF.  I have used it already to overwrite some standard JSF converters.

Rudy

On 16 October 2012 13:37, Gerhard Petracek <ge...@gmail.com>wrote:

> there are several requirements which aren't related to a db...
> (in most cases such functionality gets triggered during the first request.
> that's currently the only workaround which works for all constellations
> i've seen so far.)
>
> regards,
> gerhard
>
>
>
> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
>
> > hmm,
> >
> > not in @Startup
> >
> > let think to a database provisionning using the DS datasources
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> >
> > 2012/10/16 Mark Struberg <st...@yahoo.de>
> >
> > >
> > >
> > > Yes it works fine if you only need EJB stuff, but in Extensions you
> > pretty
> > > often need to interact with other frameworks
> > >
> > > LieGrue,
> > > strub
> > >
> > > >________________________________
> > > > From: Romain Manni-Bucau <rm...@gmail.com>
> > > >To: deltaspike-dev@incubator.apache.org; Mark Struberg <
> > struberg@yahoo.de
> > > >
> > > >Sent: Tuesday, October 16, 2012 12:01 PM
> > > >Subject: Re: @Startup like?
> > > >
> > > >
> > > >That's not an issue IMO,
> > > >
> > > >
> > > >Personally i abuse of it to initialize stuff wich is needed later but
> > not
> > > linked to any other spec
> > > >
> > > >
> > > >Romain Manni-Bucau
> > > >Twitter: @rmannibucau
> > > >Blog: http://rmannibucau.wordpress.com/
> > > >LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > > >Github: https://github.com/rmannibucau
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >2012/10/16 Mark Struberg <st...@yahoo.de>
> > > >
> > > >
> > > >>
> > > >>@Startup is perfectly broken as well. Read 4.8.1
> > > >>
> > > >>" 4.8.1 Singleton Initialization ...the container must initialize the
> > > Singleton bean
> > > >>instance during the application startup sequence...."
> > > >>
> > > >>
> > > >>It does NOT define whether other parts of the container must already
> be
> > > available. I've noticed that @Startup beans get initialized _before_
> the
> > > JSF container is fully booted.
> > > >>
> > > >>
> > > >>What is missing is a general startup order for EE containers.
> Including
> > > events.
> > > >>
> > > >>
> > > >>
> > > >>LieGrue,
> > > >>strub
> > > >>
> > > >>----- Original Message -----
> > > >>
> > > >>> From: Jean-Louis MONTEIRO <je...@gmail.com>
> > > >>> To: deltaspike-dev@incubator.apache.org
> > > >>> Cc:
> > > >>
> > > >>> Sent: Tuesday, October 16, 2012 9:20 AM
> > > >>> Subject: Re: @Startup like?
> > > >>>
> > > >>> Basically, what has been defined for Singleton beans (@Startup and
> > > >>> @DependsOn)?
> > > >>>
> > > >>> Jean-Louis
> > > >>>
> > > >>> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> > > >>>
> > > >>>>  Hi guys,
> > > >>>>
> > > >>>>  after a talk with Charles i wonder if we couldn't add a kind of
> > > >>>>  @Startup/@LoadOnStartup  feature to DS.
> > > >>>>
> > > >>>>  The idea could be to for the init of some bean with the last cdi
> > > event at
> > > >>>>  startup.
> > > >>>>
> > > >>>>  It could be used to force some init in standalone (cdictrl) or
> > > without
> > > >>>>  being dependent of the environment (JSE, JEE, Web...)
> > > >>>>
> > > >>>>  wdyt?
> > > >>>>
> > > >>>>  *Romain Manni-Bucau*
> > > >>>>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > >>>>  *Blog: **http://rmannibucau.wordpress.com/*<
> > > >>>>  http://rmannibucau.wordpress.com/>
> > > >>>>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > >>>>  *Github: https://github.com/rmannibucau*
> > > >>>>
> > > >>>
> > > >>
> > > >
> > > >
> > > >
> > >
> >
>

Re: @Startup like?

Posted by Gerhard Petracek <ge...@gmail.com>.
there are several requirements which aren't related to a db...
(in most cases such functionality gets triggered during the first request.
that's currently the only workaround which works for all constellations
i've seen so far.)

regards,
gerhard



2012/10/16 Romain Manni-Bucau <rm...@gmail.com>

> hmm,
>
> not in @Startup
>
> let think to a database provisionning using the DS datasources
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
>
> 2012/10/16 Mark Struberg <st...@yahoo.de>
>
> >
> >
> > Yes it works fine if you only need EJB stuff, but in Extensions you
> pretty
> > often need to interact with other frameworks
> >
> > LieGrue,
> > strub
> >
> > >________________________________
> > > From: Romain Manni-Bucau <rm...@gmail.com>
> > >To: deltaspike-dev@incubator.apache.org; Mark Struberg <
> struberg@yahoo.de
> > >
> > >Sent: Tuesday, October 16, 2012 12:01 PM
> > >Subject: Re: @Startup like?
> > >
> > >
> > >That's not an issue IMO,
> > >
> > >
> > >Personally i abuse of it to initialize stuff wich is needed later but
> not
> > linked to any other spec
> > >
> > >
> > >Romain Manni-Bucau
> > >Twitter: @rmannibucau
> > >Blog: http://rmannibucau.wordpress.com/
> > >LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > >Github: https://github.com/rmannibucau
> > >
> > >
> > >
> > >
> > >
> > >2012/10/16 Mark Struberg <st...@yahoo.de>
> > >
> > >
> > >>
> > >>@Startup is perfectly broken as well. Read 4.8.1
> > >>
> > >>" 4.8.1 Singleton Initialization ...the container must initialize the
> > Singleton bean
> > >>instance during the application startup sequence...."
> > >>
> > >>
> > >>It does NOT define whether other parts of the container must already be
> > available. I've noticed that @Startup beans get initialized _before_ the
> > JSF container is fully booted.
> > >>
> > >>
> > >>What is missing is a general startup order for EE containers. Including
> > events.
> > >>
> > >>
> > >>
> > >>LieGrue,
> > >>strub
> > >>
> > >>----- Original Message -----
> > >>
> > >>> From: Jean-Louis MONTEIRO <je...@gmail.com>
> > >>> To: deltaspike-dev@incubator.apache.org
> > >>> Cc:
> > >>
> > >>> Sent: Tuesday, October 16, 2012 9:20 AM
> > >>> Subject: Re: @Startup like?
> > >>>
> > >>> Basically, what has been defined for Singleton beans (@Startup and
> > >>> @DependsOn)?
> > >>>
> > >>> Jean-Louis
> > >>>
> > >>> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> > >>>
> > >>>>  Hi guys,
> > >>>>
> > >>>>  after a talk with Charles i wonder if we couldn't add a kind of
> > >>>>  @Startup/@LoadOnStartup  feature to DS.
> > >>>>
> > >>>>  The idea could be to for the init of some bean with the last cdi
> > event at
> > >>>>  startup.
> > >>>>
> > >>>>  It could be used to force some init in standalone (cdictrl) or
> > without
> > >>>>  being dependent of the environment (JSE, JEE, Web...)
> > >>>>
> > >>>>  wdyt?
> > >>>>
> > >>>>  *Romain Manni-Bucau*
> > >>>>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > >>>>  *Blog: **http://rmannibucau.wordpress.com/*<
> > >>>>  http://rmannibucau.wordpress.com/>
> > >>>>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > >>>>  *Github: https://github.com/rmannibucau*
> > >>>>
> > >>>
> > >>
> > >
> > >
> > >
> >
>

Re: @Startup like?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
hmm,

not in @Startup

let think to a database provisionning using the DS datasources

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*




2012/10/16 Mark Struberg <st...@yahoo.de>

>
>
> Yes it works fine if you only need EJB stuff, but in Extensions you pretty
> often need to interact with other frameworks
>
> LieGrue,
> strub
>
> >________________________________
> > From: Romain Manni-Bucau <rm...@gmail.com>
> >To: deltaspike-dev@incubator.apache.org; Mark Struberg <struberg@yahoo.de
> >
> >Sent: Tuesday, October 16, 2012 12:01 PM
> >Subject: Re: @Startup like?
> >
> >
> >That's not an issue IMO,
> >
> >
> >Personally i abuse of it to initialize stuff wich is needed later but not
> linked to any other spec
> >
> >
> >Romain Manni-Bucau
> >Twitter: @rmannibucau
> >Blog: http://rmannibucau.wordpress.com/
> >LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >Github: https://github.com/rmannibucau
> >
> >
> >
> >
> >
> >2012/10/16 Mark Struberg <st...@yahoo.de>
> >
> >
> >>
> >>@Startup is perfectly broken as well. Read 4.8.1
> >>
> >>" 4.8.1 Singleton Initialization ...the container must initialize the
> Singleton bean
> >>instance during the application startup sequence...."
> >>
> >>
> >>It does NOT define whether other parts of the container must already be
> available. I've noticed that @Startup beans get initialized _before_ the
> JSF container is fully booted.
> >>
> >>
> >>What is missing is a general startup order for EE containers. Including
> events.
> >>
> >>
> >>
> >>LieGrue,
> >>strub
> >>
> >>----- Original Message -----
> >>
> >>> From: Jean-Louis MONTEIRO <je...@gmail.com>
> >>> To: deltaspike-dev@incubator.apache.org
> >>> Cc:
> >>
> >>> Sent: Tuesday, October 16, 2012 9:20 AM
> >>> Subject: Re: @Startup like?
> >>>
> >>> Basically, what has been defined for Singleton beans (@Startup and
> >>> @DependsOn)?
> >>>
> >>> Jean-Louis
> >>>
> >>> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> >>>
> >>>>  Hi guys,
> >>>>
> >>>>  after a talk with Charles i wonder if we couldn't add a kind of
> >>>>  @Startup/@LoadOnStartup  feature to DS.
> >>>>
> >>>>  The idea could be to for the init of some bean with the last cdi
> event at
> >>>>  startup.
> >>>>
> >>>>  It could be used to force some init in standalone (cdictrl) or
> without
> >>>>  being dependent of the environment (JSE, JEE, Web...)
> >>>>
> >>>>  wdyt?
> >>>>
> >>>>  *Romain Manni-Bucau*
> >>>>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >>>>  *Blog: **http://rmannibucau.wordpress.com/*<
> >>>>  http://rmannibucau.wordpress.com/>
> >>>>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >>>>  *Github: https://github.com/rmannibucau*
> >>>>
> >>>
> >>
> >
> >
> >
>

Re: @Startup like?

Posted by Mark Struberg <st...@yahoo.de>.

Yes it works fine if you only need EJB stuff, but in Extensions you pretty often need to interact with other frameworks

LieGrue,
strub

>________________________________
> From: Romain Manni-Bucau <rm...@gmail.com>
>To: deltaspike-dev@incubator.apache.org; Mark Struberg <st...@yahoo.de> 
>Sent: Tuesday, October 16, 2012 12:01 PM
>Subject: Re: @Startup like?
> 
>
>That's not an issue IMO,
>
>
>Personally i abuse of it to initialize stuff wich is needed later but not linked to any other spec
>
>
>Romain Manni-Bucau
>Twitter: @rmannibucau
>Blog: http://rmannibucau.wordpress.com/
>LinkedIn: http://fr.linkedin.com/in/rmannibucau
>Github: https://github.com/rmannibucau
>
>
>
>
>
>2012/10/16 Mark Struberg <st...@yahoo.de>
>
>
>>
>>@Startup is perfectly broken as well. Read 4.8.1
>>
>>" 4.8.1 Singleton Initialization ...the container must initialize the Singleton bean
>>instance during the application startup sequence...."
>>
>>
>>It does NOT define whether other parts of the container must already be available. I've noticed that @Startup beans get initialized _before_ the JSF container is fully booted.
>>
>>
>>What is missing is a general startup order for EE containers. Including events.
>>
>>
>>
>>LieGrue,
>>strub
>>
>>----- Original Message -----
>>
>>> From: Jean-Louis MONTEIRO <je...@gmail.com>
>>> To: deltaspike-dev@incubator.apache.org
>>> Cc:
>>
>>> Sent: Tuesday, October 16, 2012 9:20 AM
>>> Subject: Re: @Startup like?
>>>
>>> Basically, what has been defined for Singleton beans (@Startup and
>>> @DependsOn)?
>>>
>>> Jean-Louis
>>>
>>> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
>>>
>>>>  Hi guys,
>>>>
>>>>  after a talk with Charles i wonder if we couldn't add a kind of
>>>>  @Startup/@LoadOnStartup  feature to DS.
>>>>
>>>>  The idea could be to for the init of some bean with the last cdi event at
>>>>  startup.
>>>>
>>>>  It could be used to force some init in standalone (cdictrl) or without
>>>>  being dependent of the environment (JSE, JEE, Web...)
>>>>
>>>>  wdyt?
>>>>
>>>>  *Romain Manni-Bucau*
>>>>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>>>>  *Blog: **http://rmannibucau.wordpress.com/*<
>>>>  http://rmannibucau.wordpress.com/>
>>>>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>>>  *Github: https://github.com/rmannibucau*
>>>>
>>>
>>
>
>
>

Re: @Startup like?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
That's not an issue IMO,

Personally i abuse of it to initialize stuff wich is needed later but not
linked to any other spec

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*




2012/10/16 Mark Struberg <st...@yahoo.de>

>
>
> @Startup is perfectly broken as well. Read 4.8.1
>
> " 4.8.1 Singleton Initialization ...the container must initialize the
> Singleton bean
> instance during the application startup sequence...."
>
>
> It does NOT define whether other parts of the container must already be
> available. I've noticed that @Startup beans get initialized _before_ the
> JSF container is fully booted.
>
>
> What is missing is a general startup order for EE containers. Including
> events.
>
>
> LieGrue,
> strub
>
> ----- Original Message -----
> > From: Jean-Louis MONTEIRO <je...@gmail.com>
> > To: deltaspike-dev@incubator.apache.org
> > Cc:
> > Sent: Tuesday, October 16, 2012 9:20 AM
> > Subject: Re: @Startup like?
> >
> > Basically, what has been defined for Singleton beans (@Startup and
> > @DependsOn)?
> >
> > Jean-Louis
> >
> > 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> >
> >>  Hi guys,
> >>
> >>  after a talk with Charles i wonder if we couldn't add a kind of
> >>  @Startup/@LoadOnStartup  feature to DS.
> >>
> >>  The idea could be to for the init of some bean with the last cdi event
> at
> >>  startup.
> >>
> >>  It could be used to force some init in standalone (cdictrl) or without
> >>  being dependent of the environment (JSE, JEE, Web...)
> >>
> >>  wdyt?
> >>
> >>  *Romain Manni-Bucau*
> >>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >>  *Blog: **http://rmannibucau.wordpress.com/*<
> >>  http://rmannibucau.wordpress.com/>
> >>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >>  *Github: https://github.com/rmannibucau*
> >>
> >
>

Re: @Startup like?

Posted by Mark Struberg <st...@yahoo.de>.

@Startup is perfectly broken as well. Read 4.8.1 

" 4.8.1 Singleton Initialization ...the container must initialize the Singleton bean
instance during the application startup sequence...." 


It does NOT define whether other parts of the container must already be available. I've noticed that @Startup beans get initialized _before_ the JSF container is fully booted.


What is missing is a general startup order for EE containers. Including events.


LieGrue,
strub

----- Original Message -----
> From: Jean-Louis MONTEIRO <je...@gmail.com>
> To: deltaspike-dev@incubator.apache.org
> Cc: 
> Sent: Tuesday, October 16, 2012 9:20 AM
> Subject: Re: @Startup like?
> 
> Basically, what has been defined for Singleton beans (@Startup and
> @DependsOn)?
> 
> Jean-Louis
> 
> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
> 
>>  Hi guys,
>> 
>>  after a talk with Charles i wonder if we couldn't add a kind of
>>  @Startup/@LoadOnStartup  feature to DS.
>> 
>>  The idea could be to for the init of some bean with the last cdi event at
>>  startup.
>> 
>>  It could be used to force some init in standalone (cdictrl) or without
>>  being dependent of the environment (JSE, JEE, Web...)
>> 
>>  wdyt?
>> 
>>  *Romain Manni-Bucau*
>>  *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>>  *Blog: **http://rmannibucau.wordpress.com/*<
>>  http://rmannibucau.wordpress.com/>
>>  *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>  *Github: https://github.com/rmannibucau*
>> 
> 

Re: @Startup like?

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Basically, what has been defined for Singleton beans (@Startup and
@DependsOn)?

Jean-Louis

2012/10/16 Romain Manni-Bucau <rm...@gmail.com>

> Hi guys,
>
> after a talk with Charles i wonder if we couldn't add a kind of
> @Startup/@LoadOnStartup  feature to DS.
>
> The idea could be to for the init of some bean with the last cdi event at
> startup.
>
> It could be used to force some init in standalone (cdictrl) or without
> being dependent of the environment (JSE, JEE, Web...)
>
> wdyt?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>

Re: @Startup like?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
+1 for new events..but need to wait next spec

what about an environment integration? we could have a @javax.ejb.Singleton
in JEE, a ServletContainerInitializer or ServletContextListener in web and
something on our cdictrl in other cases

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*




2012/10/16 Gerhard Petracek <ge...@gmail.com>

> hi romain,
>
> currently it depends on the other parts of your application.
> e.g. in codi we did it for cdi + jsf.
>
> we discussed it several times - since AfterDeploymentValidation isn't
> enough, the following events should be available in the spec(s) imo:
>  - ContainerStarted (for special cdi extensions which need to get executed
> as soon as the cdi container is ready and before application logic gets
> triggered)
>  - ApplicationStarted (for application specific logic which needs the
> guarantee that all containers like cdi, jsf,... are ready)
>
> regards,
> gerhard
>
>
>
> 2012/10/16 Romain Manni-Bucau <rm...@gmail.com>
>
> > Hi guys,
> >
> > after a talk with Charles i wonder if we couldn't add a kind of
> > @Startup/@LoadOnStartup  feature to DS.
> >
> > The idea could be to for the init of some bean with the last cdi event at
> > startup.
> >
> > It could be used to force some init in standalone (cdictrl) or without
> > being dependent of the environment (JSE, JEE, Web...)
> >
> > wdyt?
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
>

Re: @Startup like?

Posted by Gerhard Petracek <ge...@gmail.com>.
hi romain,

currently it depends on the other parts of your application.
e.g. in codi we did it for cdi + jsf.

we discussed it several times - since AfterDeploymentValidation isn't
enough, the following events should be available in the spec(s) imo:
 - ContainerStarted (for special cdi extensions which need to get executed
as soon as the cdi container is ready and before application logic gets
triggered)
 - ApplicationStarted (for application specific logic which needs the
guarantee that all containers like cdi, jsf,... are ready)

regards,
gerhard



2012/10/16 Romain Manni-Bucau <rm...@gmail.com>

> Hi guys,
>
> after a talk with Charles i wonder if we couldn't add a kind of
> @Startup/@LoadOnStartup  feature to DS.
>
> The idea could be to for the init of some bean with the last cdi event at
> startup.
>
> It could be used to force some init in standalone (cdictrl) or without
> being dependent of the environment (JSE, JEE, Web...)
>
> wdyt?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>