4

I tried annotating the class with the scopetype APPLICATION and a method with the @Create, @Beg, but this doesn't seem to work.

What I want is to start an infinite loop right when the application starts.

2 Answers 2

8

If you want a method to be executed right after initialization you can use the folowing annotation:

@Observer("org.jboss.seam.postInitialization")
1
  • don't forget to add @Name("chooseOneName") to your class
    – Julien
    Dec 9, 2016 at 13:46
1

You can annotate your class with the @Startup annotation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.