Take a simple CDI (it could also be a JSF managed bean) bean as follows.
import java.io.Serializable; import javax.inject.Named; import javax.faces.view.
In the case of a servlet or other context supporting the web.xml context-param, you could set WELD_CONTEXT_ID_KEY as currently noted in the latest Weld documentation on supported environments:
WELD_CONTEXT_ID_KEY customValue