On Mar 13, 2007, at 4:39 PM, Bernd Bohmann wrote:

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.

Thanks!



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 don't see how that relates to my request that I be allowed to set the instance of the factory in code .... not the class, not properties, but the actual instance itself.

What's wrong with my proposal in https://issues.apache.org/jira/ secure/attachment/12353202/MYFACES-1559-3.patch

public abstract class LifecycleProviderFactory {
protected static final String FACTORY_DEFAULT = DefaultLifecycleProviderFactory.class.getName();

    private static volatile LifecycleProviderFactory INSTANCE;

public static LifecycleProviderFactory getLifecycleProviderFactory()
    {
        LifecycleProviderFactory instance = INSTANCE;
        if (instance != null) {
            return instance;
        }
return (LifecycleProviderFactory) DiscoverSingleton.find (LifecycleProviderFactory.class, FACTORY_DEFAULT);
    }


public static void setLifecycleProviderFactory (LifecycleProviderFactory instance) {
        INSTANCE = instance;
    }

public abstract LifecycleProvider getLifecycleProvider (ExternalContext externalContext);

    public abstract void release();

}


I get to set the instance I want to use, and you get to use discovery? I also don't have to worry about whether the discovery framework is actually thread safe.

thanks
david jencks


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


Reply via email to