6 Replies Latest reply on Jul 10, 2012 3:44 AM by ys liu

    Server side exception doesn't break transaction commit

    ys liu Newbie

      I'm using HornetQ_2_2_5_Final as JMS provider.

      In my configuration paging is enabled.

      In my program JMS client publish event in a JTA transaction boundary.

      I ran into a case that disk use to store paging file is full, then server side got some IO exception. I expect to get some exception when try to commit the transaction in client side. But it didn't.


      My question is:

      Will hornetQ server handle exception and mark the transaction rollback_only?
      May I make any configuration to let JMS client commit transaction fail in such a case?

      Since HornetQ server logged an error of the exception so I got a call stack.

      I went through the code alone the call stack and didn't find logic that handle such kind exception.

      And finally this exception was discard by logging an error in ServerSessionPacketHandler.

      I also go through latest code in main branch and found the logic is simillar. is there any exception handling strategy I didn't found?

       

      The exception logged by HornetQ server is as following:

      2012-03-09 05:31:08,058 ERROR [org.hornetq.core.protocol.core.ServerSessionPacketHandler] Caught unexpected exception

      java.io.IOException: No space left on device
             at sun.nio.ch.FileDispatcher.write0(Native Method)

             at sun.nio.ch.FileDispatcher.write(FileDispatcher.java:44)

             at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:72)

             at sun.nio.ch.IOUtil.write(IOUtil.java:43)

             at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:198)

             at org.hornetq.core.journal.impl.NIOSequentialFile.doInternalWrite(NIOSequentialFile.java:343)

             at org.hornetq.core.journal.impl.NIOSequentialFile.internalWrite(NIOSequentialFile.java:302)

             at org.hornetq.core.journal.impl.NIOSequentialFile.writeDirect(NIOSequentialFile.java:265)

             at org.hornetq.core.paging.impl.PageImpl.write(PageImpl.java:195)

             at org.hornetq.core.paging.impl.PagingStoreImpl.page(PagingStoreImpl.java:878)

             at org.hornetq.core.paging.impl.PagingStoreImpl.page(PagingStoreImpl.java:320)

             at org.hornetq.core.postoffice.impl.PostOfficeImpl.processRoute(PostOfficeImpl.java:886)

             at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:634)

             at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:561)

             at org.hornetq.core.server.impl.ServerSessionImpl.doSend(ServerSessionImpl.java:1365)

             at org.hornetq.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1107)

             at org.hornetq.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:440)

             at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:474)

             at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:496)

             at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:457)

             at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:459)

             at org.hornetq.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:137)

             at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)

             at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

               at java.lang.Thread.run(Thread.java:662)