Incorrect initialization of OrchestraFacesContextFactory
--------------------------------------------------------

                 Key: ORCHESTRA-23
                 URL: https://issues.apache.org/jira/browse/ORCHESTRA-23
             Project: MyFaces Orchestra
          Issue Type: Bug
          Components: FrameworkAdapter
    Affects Versions: 1.1
         Environment: windows, linux, solaris
            Reporter: Dan Tran
            Priority: Blocker
             Fix For: 2.0
         Attachments: diff.txt

 

In org.apache.myfaces.orchestra.lib.jsf. OrchestraFacesContextFactory. 
getFacesContext(...)

 

The ContextLockRequestHandler is registered BEFORE 
FrameworkAdapterRequestHandler,

 

For serialization of requests to work properly, the FrameworkAdapter must be 
initialized BEFORE the ContextLockRequestHandler attempts to use it in 
ContextLockRequestHandler.init(...) (in fact ,there is even a NOTE in there to 
that effect).  The current order means the FrameworkAdapter is initialized JUST 
AFTER the ContextLockRequestHandler needs it.

 

The fix is to swap the order of registering these adapters in 
OrchestraFacesContextFactory. getFacesContext(...).

 

        final LinkedList handlers = new LinkedList();

        handlers.add(new ContextLockRequestHandler());

        handlers.add(new FrameworkAdapterRequestHandler());

        handlers.add(new ConversationManagerRequestHandler());

        handlers.add(new DataSourceLeakRequestHandler());

 

should read

 

        final LinkedList handlers = new LinkedList();

        handlers.add(new FrameworkAdapterRequestHandler());

        handlers.add(new ContextLockRequestHandler());

        handlers.add(new ConversationManagerRequestHandler());

        handlers.add(new DataSourceLeakRequestHandler());

 



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to