public class UserSessionListener implements HttpSessionListener {
private static final String USER_CONTEXT = "UserSessionListener_USER_CONTEXT";
@Override
public void sessionCreated(HttpSessionEvent httpSessionEvent) {
final ServiceContext cxt = new ServiceContextImpl();
httpSessionEvent.getSession().setAttribute(USER_CONTEXT, cxt);
}