|    org.hibernate.SessionException: Session is closed!   
  |     at 
org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
   
  |     at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1258)  
 
  |     at 
org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)   
  |     at 
com.logansoft.firstFlow.service.impl.JbpmServiceImpl.initJbpm(JbpmServiceImpl.java:128)
   
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)   
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   
  |     at java.lang.reflect.Method.invoke(Method.java:597)   
  |     at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
   
  |     at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
   
  |     at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
   
  |     at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
   
  |     at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   
  |     at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
   
  |     at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   
  |     at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
  
  | 
  | 
here the problem

  | if (isCurrentSessionEnabled) {   
  |         session = getSessionFactory().getCurrentSession();   
  |         log.debug("using current hibernate session " + session);   
  |         mustSessionBeClosed = false;   
  |         mustSessionBeFlushed = false;   
  |         mustConnectionBeClosed = false;   
  |       } else if (connection!=null) {   
  |         log.debug("creating hibernate session with connection 
"+connection);   
  |         session = getSessionFactory().openSession(connection);   
  |         mustSessionBeClosed = true;   
  |         mustSessionBeFlushed = true;   
  |         mustConnectionBeClosed = false;   
  |       } else {   
  |         log.debug("creating hibernate session");   
  |         session = getSessionFactory().openSession();   
  |         mustSessionBeClosed = true;   
  |         mustSessionBeFlushed = true;   
  |         mustConnectionBeClosed = false;   
  |       }   
  |       if (isTransactionEnabled) {   
  |         beginTransaction();   
  |       }  
  | 
if i change above code to this , the problem solved

  | if (isCurrentSessionEnabled) {   
  | og.debug("creating hibernate session");   
  |         
  |     session = getSessionFactory().openSession();   
  |     mustSessionBeClosed = true;   
  |     mustSessionBeFlushed = true;   
  |     mustConnectionBeClosed = false;   
  |   }   
  |      if (isTransactionEnabled) {   
  |        beginTransaction();  
  | 

who can answer my question?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174191#4174191

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174191
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to