1 2 Previous Next 23 Replies Latest reply: May 27, 2013 8:04 AM by Veit Guna Go to original post RSS
  • 15. Re: EJB lookup during server shutdown
    David Lloyd Master

    In your example, I believe you should add @DependsOn("SecondSessionBean") to the class declaration of FirstSessionBean.

  • 16. Re: EJB lookup during server shutdown
    Maycon Oliveira Newbie

    I already tried this option. And the problem still there . Also I tried to add DependsOn to some SingletonBean and implement a @PreDestroy to force the resources to wait. And nothing.

  • 17. Re: EJB lookup during server shutdown
    David Lloyd Master

    OK then there's probably still a bug in the implementation.  We'll look into it.

  • 18. Re: EJB lookup during server shutdown
    Maycon Oliveira Newbie

    Really thanks, if possible can you post some link to follow this bug? (and then i can do some tests).

     

    Thanks again

  • 19. Re: EJB lookup during server shutdown
    Stuart Douglas Master

    I think I can see what is happening here, the EJB that is currently being invoked is shutting down, even though there is an active invocation, as StrictMaxPool does not wait for active invocations to finish.

  • 20. Re: EJB lookup during server shutdown
    Maycon Oliveira Newbie

    Sorry to ask now ( 1 month later), but we have a bigger project that depends on this feature (do some taks before server shutdown). 

     

    Do you have any ideas when this feature will be included on jboss? maybe on the 7.2.0 release?

     

    This is related  with AS7-484 (gracefull shutdown)?

     

     

    Thanks!

  • 21. Re: EJB lookup during server shutdown
    Jason Greene Master

    There is a fix that was change into upstream that makes ejb shutdown more graceful. Combined with @DependsOn this should resolve the issue.

     

    Give the latest snapshot a try:

    http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-7.x-latest/lastSuccessfulBuild/artifact/build/target/jboss-as-7.x.zip

  • 22. Re: EJB lookup during server shutdown
    Maycon Oliveira Newbie

    Using @DependsOn now works like a charm!!!!

     

    Realy thanks.

  • 23. Re: EJB lookup during server shutdown
    Veit Guna Newbie

    Hi.

     

    Can someone confirm/deny that this fix was included in the 7.1.3 final tag? I'll tried that with 7.1.3 final where I use @DependsOn in an MDB that references an EJB (non-singleton). Currently on shutdown, when a message is currently processing, it throws:

     

    13:53:16,943 ERROR [org.jboss.as.ejb3] javax.ejb.EJBTransactionRolledbackException: JBAS014559: Invocation cannot proceed as component is shutting down
    13:53:16,943 ERROR [org.jboss.as.ejb3.invocation] JBAS014134: EJB Invocation failed on component EventProcessor for method public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message): javax.ejb.EJBTransactionRolledbackException: JBAS014559: Invocation cannot proceed as component is shutting down
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:137) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:188) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:42) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:43) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescription.java:184) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:181) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at javax.jms.MessageListener$$$view5.onMessage(Unknown Source) [jboss-jms-api_1.1_spec-1.0.1.Final.jar:1.0.1.Final]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_27]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_27]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_27]
        at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_27]
        at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:142) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at $Proxy100.onMessage(Unknown Source)    at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:311)
        at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1028)
        at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:50)
        at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1173)
        at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_27]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_27]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_27]
    Caused by: javax.ejb.EJBException: JBAS014559: Invocation cannot proceed as component is shutting down
        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:37) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:181) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
    

     

     

    Any chance that this dependency can also be defined via jboss-deployment-structure.xml somehow as an alternative?

1 2 Previous Next