Reply To: Problem with conversation scope using Prettyfaces and Apache Myfaces CODI

Splash Forums PrettyFaces Users Problem with conversation scope using Prettyfaces and Apache Myfaces CODI Reply To: Problem with conversation scope using Prettyfaces and Apache Myfaces CODI

#24582

sunnymoon
Participant

Unfortunately I allready tried the suggestion you made but it didn’t work.

I tried the following:

Within my app faces-config.xml set metadata-complete=true.
Specify both listeners in the correct order and all other information from both prettyfaces and CODI -> doesn’t work.
Specify absolute-ordering between CODI and prettyfaces -> doesn’t work.

I managed to narrow it down a little more and it seems CODI is also using a different JSF Lifecycle implementation and Context Factory: CODILifecycleWrapper and CODILifecycleFactoryWrapper.

This LifecycleFactory from CODI, when instantiating the CODILifecycleWrapper has this code:

    public Lifecycle getLifecycle(String s)
    {
        Lifecycle result = this.wrapped.getLifecycle(s);

        if(this.deactivated)
        {
            return result;
        }
        return new CodiLifecycleWrapper(result, PhaseListenerExtension.consumePhaseListeners());
    }

and the PhaseListenerExtension.consumePhaseListeners does not seem to respect the faces-config phase-listeners order as it uses their own JsfPhaseListener annotation scanner (alongside an InvocationOrder annotation).

This means I somehow have to surpass the CODILifecycleWrapper and reorder the PhaseListeners as required by my app.

This seams to be more of a problem with CODI then PrettyFaces, as it doesn’t seem that PrettyFaces is doing anything wrong here…

  • This reply was modified 8 years, 5 months ago by  sunnymoon.