3 Replies Latest reply on Jun 8, 2009 3:17 AM by jaikiran pai

    Calling a stored procedure works differently than in 4.2?

    ezza ezaezazea Novice

      I have a SFSB called SaisieExploit (with extended persistence context) that represents a conversation (here the conversation is initiated and ended by a minimal test).
      To manage the conversation an SLSB (called VersionRefFacadeTOPO) is used to call a stored procedure.

      At the end of the test, i call successively 2 methods of the SFSB, to cancel the conversation then end the session (the --> indicate interesting invocations):
      1/ SFSB.annuler()-->[...]-->SLSB.appellePS_suppressionRefExploitation-->Stored procedure
      2/ SFSB.finSession--> query.getResultList

      It used to work in JBoss 4.2.3 but no longer in 5.1.0:
      1: i get the dreaded "Closing a connection for you. Please close them yourself"
      2: the connection is closed and the request fails

      Here are the logs (i separated them with dashes for readability):

      STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#0[10.27.252.164:50877]] - SaisieContextePersistenceEtendu/initHandlersStatefulsScopeApplication
      17:12:52,493 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,493 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,498 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,498 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,504 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,504 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,507 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,507 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,513 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:52,513 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:53,570 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:53,571 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:53,588 INFO [STDOUT] [SA.ejb.LoginFacade][WorkerThread#0[10.27.252.164:50882]] -
      17:12:53,589 INFO [STDOUT] [SA.ejb.LoginFacade][WorkerThread#0[10.27.252.164:50882]] - Login de l'utilisateur : [super-util]
      17:12:53,706 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:53,706 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:54,012 INFO [STDOUT] [VersionsMDB][WorkManager(2)-13] - VersionsMDB_onMessage/message: delegator->JBossMessage[20383799278796802]:NON-PERSISTENT, deliveryId=1
      17:12:54,112 INFO [STDOUT] [VersionsMDB][WorkManager(2)-15] - VersionsMDB_onMessage/message: delegator->JBossMessage[20383799281057795]:NON-PERSISTENT, deliveryId=2
      17:12:54,161 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:54,161 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      17:12:54,180 INFO [STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#0[10.27.252.164:50888]] - --->debutSession/clientContext: ClientContext[ id=1 , UUID=fedfbf62-5d6d-4b80-9e75-ba326e0713fd ]ID=1 Username='super-util' IP='null' (0) MAC=[null] CENTRE=[CentreExploitation[ id=1 , UUID=e8be7bd2-0222-4923-a794-1df53fe36559 , libelle=DEFAULT_CE ]] Count=0 this: com.navineo.hora.ejb.session.stateful.SaisieExploit@1b8353
      17:12:54,319 INFO [STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#1[10.27.252.164:50889]] - --->debutConversation [ critereTransverse=VersionReferentielExploitationSaisie[ id=1 , UUID=71a4772f-dd27-4f78-aa10-e4552776a620 ] ]
      17:12:54,342 INFO [STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#1[10.27.252.164:50889]] - --->debutConversation/dao: com.navineo.dock.ejb.entity.common.DAOCached@229c65
      17:12:54,342 INFO [STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#1[10.27.252.164:50889]] - --->debutConversation/this: com.navineo.hora.ejb.session.stateful.SaisieExploit@1b8353
      17:12:54,501 INFO [STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#0[10.27.252.164:50890]] - <---ANNULER (=finSaisie)
      17:12:54,501 INFO [STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#0[10.27.252.164:50890]] - Suppression de critereTransverseTMP: VersionReferentielExploitationSaisie[ id=1 , UUID=71a4772f-dd27-4f78-aa10-e4552776a620 ]
      17:12:54,879 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@1ffa092
      java.lang.Throwable: STACKTRACE
       at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:278)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:524)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
       at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)
       at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
       at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
       at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:74)
       at $Proxy952.prepareCall(Unknown Source)
       at com.navineo.topo.ejb.session.VersionRefFacadeTOPO.appellePS_suppressionRefExploitation(VersionRefFacadeTOPO.java:288)
       at com.navineo.topo.ejb.session.VersionRefFacadeTOPO.doDeleteVersionRef(VersionRefFacadeTOPO.java:281)
       at com.navineo.topo.ejb.session.VersionRefFacadeTOPO.supprime(VersionRefFacadeTOPO.java:771)
       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.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.ExceptionInterceptor.log(ExceptionInterceptor.java:24)
       at sun.reflect.GeneratedMethodAccessor362.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.LogInterceptor.log(LogInterceptor.java:42)
       at sun.reflect.GeneratedMethodAccessor361.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.NullArgumentInterceptor.verifyNotNullParameters(NullArgumentInterceptor.java:25)
       at sun.reflect.GeneratedMethodAccessor458.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
       at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_31534387.invoke(InvocationContextInterceptor_z_fillMethod_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_31534387.invoke(InvocationContextInterceptor_z_setup_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ReplicantsManagerInterceptor.invoke(ReplicantsManagerInterceptor.java:52)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)
       at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)
       at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
       at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
       at $Proxy804.supprime(Unknown Source)
       at com.navineo.sa.ejb.session.stateful.SaisieContextePersistenceEtendu.annuler(SaisieContextePersistenceEtendu.java:99)
       at com.navineo.sa.ejb.session.stateful.SaisieContextePersistenceEtendu.annuler(SaisieContextePersistenceEtendu.java:118)
       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.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.sa.ejb.session.interceptors.PreloadInterceptor.preloadIfEager(PreloadInterceptor.java:72)
       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.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.NullArgumentInterceptor.verifyNotNullParameters(NullArgumentInterceptor.java:25)
       at sun.reflect.GeneratedMethodAccessor458.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.ExceptionInterceptor.log(ExceptionInterceptor.java:24)
       at sun.reflect.GeneratedMethodAccessor362.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.ExceptionWrapperInterceptor.log(ExceptionWrapperInterceptor.java:28)
       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.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
       at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_31534387.invoke(InvocationContextInterceptor_z_fillMethod_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_31534387.invoke(InvocationContextInterceptor_z_setup_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.cache.StatefulReplicationInterceptor.invoke(StatefulReplicationInterceptor.java:80)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ReplicantsManagerInterceptor.invoke(ReplicantsManagerInterceptor.java:52)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:571)
       at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
       at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
      
      ----------------------
      
      17:12:54,950 INFO [STDOUT] [com.navineo.hora.ejb.session.stateful.SaisieExploit][WorkerThread#1[10.27.252.164:50891]] - <---finSession
      17:12:54,966 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      17:12:54,966 ERROR [JDBCExceptionReporter] Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@1ffa092
      17:12:54,986 INFO [STDOUT] [Dock.interceptors][WorkerThread#1[10.27.252.164:50891]] - ExceptionInterceptor/Exception PersistenceException during: com.navineo.hora.ejb.session.stateful.SaisieExploit@1b8353/finSession[]
      javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
       at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
       at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
       at com.navineo.hora.ejb.session.stateful.SaisieExploit.libereAllLocks(SaisieExploit.java:84)
       at com.navineo.sa.ejb.session.stateful.SaisieContextePersistenceEtendu.finSession(SaisieContextePersistenceEtendu.java:192)
       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.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.sa.ejb.session.interceptors.PreloadInterceptor.preloadIfEager(PreloadInterceptor.java:72)
       at sun.reflect.GeneratedMethodAccessor602.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.NullArgumentInterceptor.verifyNotNullParameters(NullArgumentInterceptor.java:25)
       at sun.reflect.GeneratedMethodAccessor458.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.ExceptionInterceptor.log(ExceptionInterceptor.java:24)
       at sun.reflect.GeneratedMethodAccessor362.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.ExceptionWrapperInterceptor.log(ExceptionWrapperInterceptor.java:28)
       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.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
       at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_31534387.invoke(InvocationContextInterceptor_z_fillMethod_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_31534387.invoke(InvocationContextInterceptor_z_setup_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:100)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ReplicantsManagerInterceptor.invoke(ReplicantsManagerInterceptor.java:52)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
      17:12:54,988 INFO [STDOUT]
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:571)
       at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
       at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
      Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
       at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
       at org.hibernate.loader.Loader.doList(Loader.java:2231)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
       at org.hibernate.loader.Loader.list(Loader.java:2120)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
       at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
       ... 95 more
      Caused by: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@1ffa092
       at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:81)
       at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:237)
       at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
       at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
       at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
       at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
       at org.hibernate.loader.Loader.doQuery(Loader.java:696)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
       at org.hibernate.loader.Loader.doList(Loader.java:2228)
       ... 103 more
      17:12:54,989 INFO [STDOUT] [TOPO.interceptors][WorkerThread#1[10.27.252.164:50891]] - ExceptionWrapperInterceptor/Interception d'une exception de type: PersistenceException
      javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
       at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
       at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
       at com.navineo.hora.ejb.session.stateful.SaisieExploit.libereAllLocks(SaisieExploit.java:84)
       at com.navineo.sa.ejb.session.stateful.SaisieContextePersistenceEtendu.finSession(SaisieContextePersistenceEtendu.java:192)
       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.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.sa.ejb.session.interceptors.PreloadInterceptor.preloadIfEager(PreloadInterceptor.java:72)
       at sun.reflect.GeneratedMethodAccessor602.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.NullArgumentInterceptor.verifyNotNullParameters(NullArgumentInterceptor.java:25)
       at sun.reflect.GeneratedMethodAccessor458.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.ExceptionInterceptor.log(ExceptionInterceptor.java:24)
       at sun.reflect.GeneratedMethodAccessor362.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
       at com.navineo.dock.ejb.session.interceptors.ExceptionWrapperInterceptor.log(ExceptionWrapperInterceptor.java:28)
       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.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
       at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
       at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
       at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
       at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_31534387.invoke(InvocationContextInterceptor_z_fillMethod_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
       at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_31534387.invoke(InvocationContextInterceptor_z_setup_31534387.java)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:100)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.remoting.ReplicantsManagerInterceptor.invoke(ReplicantsManagerInterceptor.java:52)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation
      17:12:55,012 INFO [STDOUT] .invokeNext(MethodInvocation.java:102)
       at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
       at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:571)
       at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
       at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
      Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
       at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
       at org.hibernate.loader.Loader.doList(Loader.java:2231)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
       at org.hibernate.loader.Loader.list(Loader.java:2120)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
       at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
       ... 95 more
      Caused by: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@1ffa092
       at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:81)
       at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:237)
       at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
       at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
       at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
       at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
       at org.hibernate.loader.Loader.doQuery(Loader.java:696)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
       at org.hibernate.loader.Loader.doList(Loader.java:2228)
       ... 103 more
      


      When i comment the stored procedure call, the second SFSB invocation works perfectly so the problem seems to be that indeed the SFSB tries to use a connection that has been closed.
      But if i annotate the stored procedure method with a NOT_SUPPORTED TransactionAttribute, it doesn't change anything.

        • 1. Re: Calling a stored procedure works differently than in 4.2
          ezza ezaezazea Novice

          Once again it did work on JBoss4.2 (but maybe as in other domains JBoss is stricter and there was already something fishy)
          Anyway here is the code for the SFSB and SLSB (only the interesting part for this one):

          SLSB:

          @Stateless @Clustered @Pool (value=PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX, maxSize=5, timeout=5000)
          @TransactionManagement(TransactionManagementType.CONTAINER)
          @TransactionAttribute(TransactionAttributeType.REQUIRED)
          @TransactionTimeout(value=3000)
          @Interceptors({NullArgumentInterceptor.class,DebugLogInterceptor.class,ExceptionInterceptor.class})
          public class VersionRefFacadeTOPO extends VersionFacade implements VersionRefFacadeTOPOLocal, VersionRefFacadeTOPORemote
          {
           protected transient Logger logger = LogManager.getLogger("TOPO.ejb.VersionRefFacade");
          
           @PersistenceContext(unitName="Exploitation")
           protected EntityManager entityManager;
          
           @EJB
           private UsersFacadeLocal usersFacade;
           @EJB
           private RfmFacadeLocal rfmFacade;
           @EJB
           private CentreExploitationFacadeLocal ceFacade;
           @EJB
           protected ParameterFacadeLocal parameterFacade;
          
           protected void doDeleteVersionRef (VersionReferentielExploitation vref) throws HibernateException, SQLException
           {
           //System.out.println ( "CLA xxxxxxxxxxxxxxx !!!!!!!!!!!!!!!!!!!!!! 1" );
           entityManager.flush();
          
           VersionReferentielExploitation versionASupprimer1 = entityManager.find(VersionReferentielExploitation.class, vref.getId());
           if( versionASupprimer1 == null)
           {
           //DO NOTHING
           logger.warn("doDeleteVersionRef/Version a supprimer introuvable : "+vref.getId());
           return;
           }
           else
           {
           logger.debug("doDeleteVersionRef/Version a supprimer : "+versionASupprimer1);
           }
          
           appellePS_suppressionRefExploitation ( vref );
           }
          
           @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
           private void appellePS_suppressionRefExploitation(VersionReferentielExploitation vref) throws HibernateException, SQLException
           {
           SessionImpl session = (SessionImpl) ( entityManager.getDelegate() );
           CallableStatement appel = session.connection().prepareCall("{call suppression.suppressionRefExploitation(?)}");
           appel.setInt(1, vref.getId());
           try
           {
           appel.execute();
           }
           finally
           {
           appel.close();
           }
           }
          
          }
          
          


          SFSB:
          package com.navineo.hora.ejb.session.stateful;
          
          import java.util.List;
          import java.util.Map;
          import java.util.WeakHashMap;
          
          import javax.ejb.EJB;
          import javax.ejb.Stateful;
          import javax.ejb.TransactionAttribute;
          import javax.ejb.TransactionAttributeType;
          import javax.ejb.TransactionManagement;
          import javax.ejb.TransactionManagementType;
          import javax.interceptor.Interceptors;
          import javax.persistence.EntityManager;
          import javax.persistence.NoResultException;
          import javax.persistence.PersistenceContext;
          import javax.persistence.PersistenceContextType;
          import javax.persistence.Query;
          
          import org.apache.log4j.LogManager;
          import org.apache.log4j.Logger;
          import org.jboss.ejb3.annotation.CacheConfig;
          import org.jboss.ejb3.annotation.Clustered;
          
          import com.navineo.dock.commande.unitaire.ClientContext;
          import com.navineo.dock.ejb.entity.EnumDomainesNavineo;
          import com.navineo.dock.ejb.entity.common.CritereTransverse;
          import com.navineo.dock.ejb.session.JMSFacade;
          import com.navineo.dock.ejb.session.interceptors.ExceptionInterceptor;
          import com.navineo.dock.ejb.session.interceptors.ExceptionWrapperInterceptor;
          import com.navineo.dock.ejb.session.interceptors.NullArgumentInterceptor;
          import com.navineo.dock.ejb.session.saisie.IAlgoFacade;
          import com.navineo.dock.ejb.transfert.outward.duplique.Graphe;
          import com.navineo.hora.ejb.session.VersionRefFacadeHORALocal;
          import com.navineo.sa.ejb.entity.version.VersionInterne;
          import com.navineo.sa.ejb.session.SaisieJMSFacadeLocal;
          import com.navineo.sa.ejb.session.interceptors.PreloadInterceptor;
          import com.navineo.sa.ejb.session.stateful.DuplicateurReferentiel;
          import com.navineo.sa.ejb.session.stateful.SaisieVersionInterne;
          import com.navineo.topo.commande.handler.CommandeHandlerServeurTopo;
          import com.navineo.topo.commande.handler.HandlerAlgoTopo;
          import com.navineo.topo.commande.handler.HandlerAlgoTopoTest;
          import com.navineo.topo.ejb.entity.version.VersionReferentielExploitation;
          import com.navineo.topo.ejb.session.saisie.AlgoTopoFacadeLocal;
          import com.navineo.topo.ejb.session.stateful.handlers.algotopo.HandlerAlgoTopoInterneLocal;
          import com.navineo.topo.ejb.session.stateful.handlers.algotopo.HandlerAlgoTopoTestInterneLocal;
          import com.navineo.topo.graphe.GrapheExploitTOPOImpl;
          
          @Stateful @Clustered
          @CacheConfig (idleTimeoutSeconds=18000L, replicationIsPassivation=false)
          @Interceptors({ExceptionWrapperInterceptor.class, ExceptionInterceptor.class, NullArgumentInterceptor.class, PreloadInterceptor.class })
          @TransactionManagement ( TransactionManagementType.CONTAINER )
          @TransactionAttribute(TransactionAttributeType.REQUIRED)
          public class SaisieExploit extends SaisieVersionInterne implements SaisieExploitLocal, SaisieExploitRemote, CommandeHandlerServeurTopo
          {
           private static Logger log = LogManager.getLogger("HORA.ejb.SaisieExploit");
           private Map<Integer,VersionReferentielExploitation> lockedVersions = new WeakHashMap<Integer,VersionReferentielExploitation> ();
          
           @PersistenceContext(unitName="Exploitation",type=PersistenceContextType.EXTENDED)
           private EntityManager em;
           @EJB
           private SaisieJMSFacadeLocal saisieJMSFacade;
           @EJB
           private VersionRefFacadeHORALocal versionRefFacade;
           @EJB
           private AlgoTopoFacadeLocal algoTopoFacade;
           @EJB
           private HandlerPivotInterneExploitLocal handlerPivot;
           @EJB
           private HandlerAlgoTopoInterneLocal handlerAlgoTopo;
           @EJB
           private HandlerAlgoTopoTestInterneLocal handlerAlgoTopoTest;
          
           /**
           * Libère tous les locks
           */
           public void libereAllLocks()
           {
           try
           {
           String queryString = "select distinct v from VersionReferentielExploitation v where v.locker=:param_client";
           Query query = em.createQuery ( queryString );
           query.setParameter ( "param_client" , fClientContextPersistence );
           List<VersionReferentielExploitation> versionsList = query.getResultList();
           for( VersionReferentielExploitation locked : versionsList )
           {
           versionRefFacade.libererLock2( locked, fClientContextPersistence );
           }
           lockedVersions.clear();
           }
           catch ( NoResultException e )
           {
           }
           }
          
           public void debutSession( ClientContext clientContext )
           {
           super.debutSession(clientContext);
           fLoginFacade.yyy ();
           }
          
           @Override
           protected void retireFlagNonAJourSurLeCritereTransverse( CritereTransverse _critereTransverse )
           {
           VersionInterne vref = (VersionInterne)_critereTransverse;
           vref.setNonAJour( false );
           }
          
           @Override
           public EntityManager em()
           {
           return em;
           }
           @Override
           public JMSFacade saisieJMSFacade()
           {
           return saisieJMSFacade;
           }
          
           // =============================================================================================================================================
          
           @Override
           public IAlgoFacade algoFacade()
           {
           return algoTopoFacade;
           }
          
           public EnumDomainesNavineo type ()
           {
           return EnumDomainesNavineo.EXPLOITATION;
           }
          
           @Override
           protected DuplicateurReferentiel duplicateur()
           {
           return versionRefFacade;
           }
          
           @Override
           public Graphe graphe()
           {
           return new GrapheExploitTOPOImpl();
           }
          
           @Override
           public HandlerPivotInterneExploitLocal getHandlerPivot()
           {
           return handlerPivot;
           }
          
           @Override
           public HandlerAlgoTopo getHandlerAlgoTopo() {
           return handlerAlgoTopo;
           }
          
           @Override
           public HandlerAlgoTopoTest getHandlerAlgoTopoTest() {
           return handlerAlgoTopoTest;
           }
          
           @Override
           protected void addHandlers() {
           super.addHandlers();
          
           addHandler( handlerAlgoTopo );
           addHandler( handlerAlgoTopoTest );
           }
          }
          


          • 2. Re: Calling a stored procedure works differently than in 4.2
            ezza ezaezazea Novice

            Alright it works with:

            private void appellePS_suppressionRefExploitation(VersionReferentielExploitation vref) throws Hiber
            nateException, SQLException
             {
             SessionImpl session = (SessionImpl) ( entityManager.getDelegate() );
             CallableStatement appel = session.connection().prepareCall("{call suppression.suppressionRefExploitation(?)}");
             appel.setInt(1, vref.getId());
             try
             {
             appel.execute();
            session.connection().close();//NECESSARY IN JBOSS 5?!
             }
             finally
             {
             appel.close();
             }
             }
            



            • 3. Re: Calling a stored procedure works differently than in 4.2
              jaikiran pai Master

               

              "chtimi2" wrote:
              Alright it works with:
               SessionImpl session = (SessionImpl) ( entityManager.getDelegate() );
               CallableStatement appel = session.connection().prepareCall("{call suppression.suppressionRefExploitation(?)}");
              ...
              session.connection().close();//NECESSARY IN JBOSS 5?!
              



              As per the javadocs of hibernate session https://www.hibernate.org/hib_docs/v3/api/org/hibernate/Session.html#connection():

              If the session is using aggressive collection release (as in a CMT environment), it is the application's responsibility to close the connection returned by this call.