What we did now was to first provide the session ID in the Application URL passed into the pagebrowser.
Code:
URL + "SessionId=" + sessionId;
and then have a SessionPhaseListener registered:
Code:
<lifecycle>
<phase-listener>smonitor.cc.ui.SessionPhaseListener</phase-listener>
</lifecycle>
which then reads the URL param and registers it in the FacesContext:
Code:
@Override
public void beforePhase(PhaseEvent arg0) {
FacesContext context = FacesContext.getCurrentInstance();
String sessionId = request.getParameter("SessionId");
FacesContext.getCurrentInstance().getExternalContext()
.getSessionMap().put(..., sessionId)
}
This way we do not need clientmethodreceiver any more. Since our complete application depends on the Session ID, it makes sense to set it globally instead of dynamically via clientmethodreceiver.
Björn