hello,

Thank you for your replies. I got this to work. I am reading about the Weld
framework as well.

Thank you.


On Sat, Mar 1, 2014 at 3:37 AM, Jakob Frank <[email protected]> wrote:

> Hi Rajika,
>
> if you want your CDI service to startup automatically (e.g. because it
> needs to register something somewhere) you should listen on the
> SystemStartupEvent which is fired once the system has come up
> completely:
>
> // trigger startup once configuration service is finished with
> initialisation
> public void initEvent(@Observes SystemStartupEvent e) {
>     // nop;
> }
>
> Best,
> Jakob
>
> On 28 February 2014 12:28, Rajika Kumarasiri
> <[email protected]> wrote:
> > helo Sergio,
> >
> > Thanks, will try that. Sure will provide a documentation enhancement
> patch
> > too.
> >
> > Thank you.
> >
> >
> > On Fri, Feb 28, 2014 at 2:38 AM, Sergio Fernández <
> > [email protected]> wrote:
> >
> >> Hi Rajika,
> >>
> >>
> >> On 28/02/14 06:23, Rajika Kumarasiri wrote:
> >>
> >>> I have created a new service for JMX(api and implementation) and now I
> >>> want
> >>> to start it with the server start up. Where should I register the
> service
> >>> so that JMX service will start at the server boot up time ?
> >>>
> >>
> >> The services are in the end CDI services (JSR346), using the JBoss Weld
> >> implementation.
> >>
> >> So you just need to add to your service class the annotation with the
> >> necessary scope, in this case @ApplicationScope. Then the platform will
> >> instantiate it, and you can normally use IoC with your new service in
> the
> >> rest of the platform.
> >>
> >> Further details at:
> >>
> >> http://marmotta.apache.org/platform
> >> http://docs.jboss.org/weld/reference/2.1.0.Final/en-US/html/
> >>
> >> If you miss anything else in the documentation, contributions there are
> >> also welcomed ;-)
> >>
> >> Cheers,
> >>
> >> --
> >> Sergio Fernández
> >> Senior Researcher
> >> Knowledge and Media Technologies
> >> Salzburg Research Forschungsgesellschaft mbH
> >> Jakob-Haringer-Straße 5/3 | 5020 Salzburg, Austria
> >> T: +43 662 2288 318 | M: +43 660 2747 925
> >> [email protected]
> >> http://www.salzburgresearch.at
> >>
>

Reply via email to