Hello David,
comments inline
David Jencks wrote:
On Mar 13, 2007, at 3:38 PM, Bernd Bohmann wrote:
I read this to mean that the jsf implementation is prohibited from
calling posConstruct methdods after putting the bean in scope, but that
it is required to call postConstruct on all annotated beans.
Do you have some evidence that the spec intends that postConstruct not
be called on any managed beans?
I asked in my first post on this subject whether a beans scope was
determined by its class or whether some instances of a class could be of
one scope and some of another. If the scope is determined by its class
then my original idea, before seeing the spec language you quote above,
was the the annotation processor would ignore PostConstruct annotations
on managed beans of scope none. Now that I've seen the spec language,
I'm quite sure the intent is that posconstruct be called on all managed
beans.
Ok, you are right I understand the spec in the wrong way. I will change
the interface to your proposal.
What is wrong with the discovery?
In geronimo you can set the ProcessorFactory with a System Property.
Which do you consider easier to understand and more likely to work in
all environments?
private Thing thing;
public void setThing(Thing thing) {
this.thing = thing;
}
or
http://jakarta.apache.org/commons/discovery/apidocs/org/apache/commons/discovery/tools/DiscoverSingleton.html
Can we combine your proposal and the DiscoverSingleton?
What about this:
http://svn.apache.org/repos/asf/myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationProcessorFactory.java
I've studied the docs for a bit and have no confidence that I could
could set it up properly in less than a day and even less confidence
that it wouldn't be accidently subverted by a user app.
thanks
david jencks