/** * To be called before bean method invocation begins */ private void beforeInvoke(PortletRequest req, PortletResponse resp, PortletConfig config) { if (acb != null) { // Set the portlet session bean holder for the thread & session PortletRequestScopedBeanHolder.setBeanHolder(); // Set the portlet session bean holder for the thread & session PortletSessionBeanHolder.setBeanHolder(req, acb.getSessionScopedConfig()); // Set the render state scoped bean holder PortletStateScopedBeanHolder.setBeanHolder(req, acb.getStateScopedConfig()); // Set up the artifact producer with request, response, and portlet config PortletArtifactProducer.setPrecursors(req, resp, config); if (LOG.isTraceEnabled()) { LOG.trace("CDI context is now set up."); } } else { if (LOG.isTraceEnabled()) { LOG.trace("CDI contextual support not available"); } } }