Hi,

after studying the sources of the LifecycleModule, I get the impression
that Onami suffers from the same problem than similar Guice extensions do:
They all work by registering a TypeListener (the LifecycleModule), which in
turn registers an InjectionListener. The injection listeners method
"afterInjection" is responsible for invocation of the annotated start
method.

The problem with that approach is that "afterInjection" is, by default,
invoked when Guice is actually creating the object. And Guice does so,
when, or even if, the injectors user requests the object. This may be
perfectly valid according to the specifications, but it is not what I'd
assume to be LifeCycle handling. I'd like to see that objects annotated
with @PostConstruct (or whatever other annotation) are started immediately.

What do others think?

Thanks,

Jochen


-- 
"That's what prayers are ... it's frightened people trying to make friends
with the bully!"

Terry Pratchett. The Last Hero

Reply via email to