How to start the process at the beginning of the Seam application

I tried to annotate the class using scopetype APPLICATION and the method with @Create, @Beg, but this does not seem to work.

I want to start an endless loop right after the application starts.

+4
source share
2 answers

If you want the method to execute immediately after initialization, you can use the following annotation:

@Observer("org.jboss.seam.postInitialization") 
+8
source

You can annotate your class using the @Startup annotation.

+1
source

All Articles