public class WeldPhaseListener extends Object implements javax.faces.event.PhaseListener
A JSF phase listener that initializes aspects of Weld in a more fine-grained, integrated manner than what is possible with a servlet filter. This phase listener works in conjunction with other hooks and callbacks registered with the JSF runtime to help manage the Weld lifecycle.
The phase listener restores the long-running conversation if the conversation id token is detected in the request, activates the conversation context in either case (long-running or transient), and finally passivates the conversation after the response has been committed.
Execute before every phase in the JSF life cycle. The order this phase listener executes in relation to other phase listeners is determined by the ordering of the faces-config.xml descriptors. This phase listener should take precedence over extensions.
Constructor and Description |
---|
WeldPhaseListener() |
Modifier and Type | Method and Description |
---|---|
void |
afterPhase(javax.faces.event.PhaseEvent phaseEvent) |
void |
beforePhase(javax.faces.event.PhaseEvent phaseEvent) |
static String |
getConversationId(javax.faces.context.FacesContext facesContext,
org.jboss.weld.context.ConversationContext conversationContext)
Gets the propagated conversation id parameter from the request
|
javax.faces.event.PhaseId |
getPhaseId()
The phase id for which this phase listener is active.
|
public static final String NO_CID
public void beforePhase(javax.faces.event.PhaseEvent phaseEvent)
beforePhase
in interface javax.faces.event.PhaseListener
public void afterPhase(javax.faces.event.PhaseEvent phaseEvent)
afterPhase
in interface javax.faces.event.PhaseListener
public javax.faces.event.PhaseId getPhaseId()
getPhaseId
in interface javax.faces.event.PhaseListener
public static String getConversationId(javax.faces.context.FacesContext facesContext, org.jboss.weld.context.ConversationContext conversationContext)
Copyright © 2013 Seam Framework. All rights reserved.