On Tue, Aug 25, 2015 at 1:19 PM, John D. Ament <john.d.ament(a)gmail.com> wrote:
Technically speaking, I can have a bean like this:
@ApplicationScoped
public class Foo {
public void onStart(@Observes @initialized(ApplicationScoped.class)
Object obj) {
// do some work here
}
}
That bean will get instantiated by the container, even if it doesn't have
any injection targets.
Indeed, that's what I meant above with the reference to the
@Initialized and @Destroyed annotations. With that construct a JMS
Listener bean can be "started" without it having to be referenced from
other code.