public void transition(final HttpServletRequest request, final String windowId, final PortletRequestLifecycle.State state) {
if (getBeanStore() == null) {
if (state.isPhase(RESOURCE_PHASE)) {
setBeanStore(new ResourceTempBeanStore(request));
} else {
setBeanStore(new SessionBeanStore(request));
}
}
String attributeName = prefix(windowId);
if (state.isPhase(RESOURCE_PHASE)) {
attributeName = Thread.currentThread().getId() + attributeName;
}
SessionBeanStore store = (SessionBeanStore) getBeanStore();
HttpSession session = store.getSession(true);
PortletRequestLifecycle lifecycle = getLifecycle(windowId);
if (lifecycle == null) {
lifecycle = (PortletRequestLifecycle) session.getAttribute(attributeName);