1 Reply Latest reply on Jul 17, 2012 4:25 AM by Andy Taylor

    ActivationConfigProperty setupAttempts is not honoured

    Ravi Singhal Newbie

      I was facing problem where MDBs were not trying to reconnect indefinetly. In one forum it was mentioned that you need to add ActivationConfigProperty setupAttempt = -1 for that. I added it in my jboss-ejb3.xml file like:

       

      <jee:message-driven>

                <jee:ejb-name>MyMDB</jee:ejb-name>

                <jee:activation-config>

                  <jee:activation-config-property>

                               <jee:activation-config-property-name>destination</jee:activation-config-property-name>

                             <jee:activation-config-property-value>my.test.topic</jee:activation-config-property-value>

                  </jee:activation-config-property>

                  <jee:activation-config-property>

                               <jee:activation-config-property-name>connectorClassName</jee:activation-config-property-name>

                               <jee:activation-config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</jee:activation-config-property-value>

                  </jee:activation-config-property>

                  <jee:activation-config-property>

                               <jee:activation-config-property-name>connectionParameters</jee:activation-config-property-name>

                               <jee:activation-config-property-value>host=hostName;port=5445</jee:activation-config-property-value>

                  </jee:activation-config-property>

                  <jee:activation-config-property>

                               <jee:activation-config-property-name>setupAttempts</jee:activation-config-property-name>

                               <jee:activation-config-property-value>-1</jee:activation-config-property-value>

                  </jee:activation-config-property>                              

                 </jee:activation-config>                              

      </jee:message-driven>

       

      Now it's just trying to reconnect only once. I am getting the following exception:

       

      18:27:24,393 WARN  [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] (Thread-494 (HornetQ-client-global-threads-406571813)) Notified of connection failure in xa recovery connectionFactory for provider ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=pund519], discoveryGroupConfiguration=null], connectorConfig=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=pund519, backupConfig=null] will attempt reconnect on next pass: HornetQException[errorCode=0 message=Netty exception]

                at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.exceptionCaught(HornetQChannelHandler.java:108) [hornetq-core-2.2.18.Final.jar:2.2.18.Final (HQ_2_2_18_FINAL, 122)]

                at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:142) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:534) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.SimpleChannelUpstreamHandler.exceptionCaught(SimpleChannelUpstreamHandler.java:148) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:122) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:432) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:95) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) [netty-3.2.6.Final.jar:]

                at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [netty-3.2.6.Final.jar:]

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]

      Caused by: java.net.SocketException: Connection reset

                at java.net.SocketInputStream.read(SocketInputStream.java:189) [rt.jar:1.7.0_02]

                at java.net.SocketInputStream.read(SocketInputStream.java:121) [rt.jar:1.7.0_02]

                at java.net.SocketInputStream.read(SocketInputStream.java:203) [rt.jar:1.7.0_02]

                at java.io.FilterInputStream.read(FilterInputStream.java:83) [rt.jar:1.7.0_02]

                at java.io.PushbackInputStream.read(PushbackInputStream.java:139) [rt.jar:1.7.0_02]

                at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:86) [netty-3.2.6.Final.jar:]

                ... 4 more