use seam jbpm in Portlet Bridge :Session is closed!
cooper_lyt Aug 4, 2011 8:34 PMi use seam create a jbpm task List :
<a:poll id="observer" enabled="#{identity.loggedIn}" interval="30000"/> <a:outputPanel ajaxRendered="true"> <rich:dataTable var="_task" value="#{pooledTaskInstanceList}" rendered="#{identity.loggedIn and not empty pooledTaskInstanceList}"> <h:column> <f:facet name="header">#{messages.task_type}</f:facet> #{_task.name} </h:column> <h:column> <f:facet name="header">#{messages.task_description}</f:facet> #{_task.description} </h:column> <h:column> <f:facet name="header">#{messages.task_created}</f:facet> <h:outputText value="#{_task.create}"> </h:outputText> </h:column> <h:column> <f:facet name="header">#{messages.action}</f:facet> <s:link action="#{pooledTask.assignToCurrentActor}" value="testas" view="/TaskList.xhtml" > <f:param name="taskId" value="#{_task.id}"/> </s:link> <h:form> <a:commandButton action="#{pooledTask.assignToCurrentActor}" value="test"> <f:param name="taskId" value="#{_task.id}"/> </a:commandButton> </h:form> </h:column> </rich:dataTable> <rich:spacer width="1" height="10"/> <rich:separator height="2" lineType="dashed"/> <rich:spacer width="1" height="10"/> <rich:dataTable var="_task" value="#{taskInstancePriorityList}" rendered="#{identity.loggedIn and not empty taskInstancePriorityList}"> <h:column> <f:facet name="header">#{messages.task_type}</f:facet> #{_task.name} </h:column> <h:column> <f:facet name="header">#{messages.task_description}</f:facet> #{_task.description} </h:column> <h:column> <f:facet name="header">#{messages.task_created}</f:facet> <h:outputText value="#{_task.create}"> </h:outputText> </h:column> <h:column> <f:facet name="header">#{messages.action}</f:facet> <s:link value="test" view="/TaskList.xhtml" action="#{pooledTask.unassign}"> <f:param name="taskId" value="#{_task.id}"/> </s:link> <h:form> <a:commandButton action="#{pooledTask.unassign}" value="test"> <f:param name="taskId" value="#{_task.id}"/> </a:commandButton> </h:form> </h:column> </rich:dataTable> </a:outputPanel>
when use s:link/button oper this Task list throws exception : org.hibernate.SessionException: Session is closed!
if i use ajax request(a:commandButton) it's work. but oper after use refresh in Browser then throws exception : org.hibernate.SessionException: Session is closed!
i open seam log , i found org.jboss.portletbridge.seam.SeamPhaseListener close and reOpen request in once request.
log:
......
09:36:03,646 DEBUG [Contexts] destroying: org.jboss.seam.core.conversationPropagation
09:36:03,646 DEBUG [Contexts] destroying: javax.portlet.faces.phase
09:36:03,646 DEBUG [Contexts] destroying: javax.portlet.faces.viewId
09:36:03,647 DEBUG [Contexts] destroying: org.jboss.seam.web.requestPathInfo
09:36:03,647 DEBUG [Contexts] destroying: javax.servlet.include.context_path
09:36:03,647 DEBUG [Contexts] destroying: org.jboss.seam.transaction.transaction
09:36:03,647 DEBUG [Contexts] destroying: com.sun.faces.INVOCATION_PATH
09:36:03,647 DEBUG [Contexts] destroying: javax.portlet.lifecycle_phase
09:36:03,647 DEBUG [Contexts] destroying: javax.portlet.request
09:36:03,647 DEBUG [Contexts] destroying: org.jboss.seam.web.requestServletPath
09:36:03,647 DEBUG [Contexts] destroying: org.jboss.seam.core.events
09:36:03,647 DEBUG [Contexts] destroying: ajaxContext
09:36:03,647 DEBUG [Contexts] destroying: org.jboss.portal.attribute.component_invocation
09:36:03,647 DEBUG [Contexts] destroying: org.ajax4jsf.application.AjaxStateManager.VIEW_SEQUENCE
09:36:03,647 DEBUG [FacesLifecycle] <<< End JSF request for /ensure-house-batch/faces
09:36:09,861 DEBUG [FacesLifecycle] >>> Begin JSF request for /ensure-house-batch/faces
09:36:09,861 DEBUG [Manager] No stored conversation
09:36:09,864 DEBUG [UTTransaction] beginning JTA transaction
09:36:09,866 ERROR [TaskMgmtSession] org.hibernate.SessionException: Session is closed!
09:36:09,866 ERROR [TaskMgmtSession] org.hibernate.SessionException: Session is closed!
09:36:09,900 DEBUG [Exceptions] reading exception mappings from /WEB-INF/pages.xml
09:36:09,941 ERROR [SeamPhaseListenerWrapper] swallowing exception
javax.el.ELException: org.jbpm.JbpmException: couldn't get task instance '8'
at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:339)
......
I use: JBOSS PortLet Bridge 2.1.0.FINAL
Seam 2.2.1.Final
RichFaces 3.3.3.Final
JBOSS AS 5.1
GateIn 3.1 FINAL
JBPM3.2.2 and i try jbpm 3.2.6.SP1 have seam problems.