1 Reply Latest reply on Mar 30, 2010 11:02 AM by Andy Taylor

    HornetQ RA not cleaning up after errors?

    Tim Fox Master

      Moving this from the jboss-dev discussion.


      Original JIRA here: https://jira.jboss.org/jira/browse/JBAS-7878


      Looks like sessions created from the RA are not being closed.


      Perusing the code it looks like this is possible if either:


      1) HornetQActivation.stop() isn't  being called properly by the AS


      2) The HornetQ RA isn't closing sessions if an exception occurred in setup. The session connections needs to be protected by finally blocks as appropriate to ensure sessions are never left hanging.


      I guess 2) is the more likely.


      Andy, Jesper - could you take a look?

        • 1. Re: HornetQ RA not cleaning up after errors?
          Andy Taylor Master

          As far as i can see this happens when the setup fails and we dont clear up the connections properly in th eRA, i will fix this in the HornetQ RA.


          There is anothe ru nderlying issue tho, it looks to me that there are 2 issues, the first looks like a classloader issue in the AS and gives the following exception:


          1. 11:38:07,872 ERROR [STDERR] java.lang.IllegalArgumentException: interface javax.resource.spi.endpoint.MessageEndpoint is not visible from class loader
          2. 11:38:07,873 ERROR [STDERR]     at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
          3. 11:38:07,873 ERROR [STDERR]     at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createProxy(JBossMessageEndpointFactory.java:154)
          4. 11:38:07,873 ERROR [STDERR]     at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createEndpoint(JBossMessageEndpointFactory.java:142)
          5. 11:38:07,873 ERROR [STDERR]     at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:171)
          6. 11:38:07,874 ERROR [STDERR]     at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:286)
          7. 11:38:07,874 ERROR [STDERR]     at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:496)
          8. 11:38:07,874 ERROR [STDERR]     at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172)
          9. 11:38:07,874 ERROR [STDERR]     at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
          10. 11:38:07,874 ERROR [STDERR]     at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780)
          11. 11:38:07,874 ERROR [STDERR]     at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
          12. 11:38:07,875 ERROR [STDERR]     at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800)
          13. 11:38:07,875 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)
          14. 11:38:07,875 ERROR [STDERR]     at org.jboss.threads.JBossThread.run(JBossThread.java:122)



          It looks lik ethis exception is swallowed however and teh HornetQ ra carries on as normal causing an npe later on.