2 Replies Latest reply on Oct 21, 2010 9:08 AM by Mark Swanson

    PreAcknowledge active?

    Mark Swanson Newbie

      I had configured pre-acknowledge to be "true" on both the resource adapter config (ra.xml) and in the connection factory connector config (hornetq-jms.xml). However, in debugging another issue we discovered that the ClientSessionImpl objects all had their "preAcknowledge" attributes set to "false". I put the HornetQ source in my library list and stepped through the debugger. It's clear that the XML is getting parsed correctly and the connection factories are getting put into JNDI with the correct name and with "preacknowledge" set to "true". But at usage time (in ClientSessionImpl) this seems to be ignored?

       

      One interesting detail is that we're using EJB 2.X, not 3.X. Thus, no annotations and no "activation configuration" on our resource adapter (I have to comment out this section in standard-jboss.xml or I cannot deploy my EAR). I'm not sure this makes a difference, however, because the JBoss 4.2.3 configuration file standard-jboss.xml does not specify "pre-acknowledge", that's done in the HornetQ ra.xml file.

       

      Perhaps this attribute is unused and pre-ack is carried by the message or some such. Anyway, it seemed quite strange so I thought I'd ask. Perhaps there's something I've missed besides these two files.

       

      Thanks again.

        • 1. Re: PreAcknowledge active?
          Clebert Suconic Master

          For MDBS you need to set properties through the activation. You won't affect anything if you set the connection factories on jms-ds.xml only.

           

          This is probably a cross-reference of our other post? you should have kept a single thread.

          • 2. Re: PreAcknowledge active?
            Mark Swanson Newbie

            OK, so I uncommented the following invoker activation config in my JBoss 4.2.3 standardjboss.xml configuration file, added the PreAcknowledge property, and still the ServerSessionImpl class shows preAcknowledge = false. But anyway this would only affect the consumer side of the ack configuration, right? Does the MDB activation config affect how the publisher operates? Wouldn't the server session still get that from the connection factory (which I've already configured?). How else would the server side / publisher know which ack mode to use?

             

            (BTW regarding my other post, I'm still thinking that these are two separate issues. Regardless of acknowledge mode, the MDB / J2EE server should ack the message automatically. And the J2EE spec does say that auto-acknowledge is the default).

             

                <!-- Uncomment to use JMS message inflow from jmsra.rar -->
                <invoker-proxy-binding>
                  <name>message-driven-bean</name>
                  <invoker-mbean>default</invoker-mbean>
                  <proxy-factory>org.jboss.ejb.plugins.inflow.JBossJMSMessageEndpointFactory</proxy-factory>
                  <proxy-factory-config>
                    <activation-config>
                       <activation-config-property>
                          <activation-config-property-name>providerAdapterJNDI</activation-config-property-name>
                          <activation-config-property-value>DefaultJMSProvider</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>minSession</activation-config-property-name>
                          <activation-config-property-value>1</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>maxSession</activation-config-property-name>
                          <activation-config-property-value>15</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>keepAlive</activation-config-property-name>
                          <activation-config-property-value>60000</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>maxMessages</activation-config-property-name>
                          <activation-config-property-value>1</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>reconnectInterval</activation-config-property-name>
                          <activation-config-property-value>10</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>useDLQ</activation-config-property-name>
                          <activation-config-property-value>false</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>DLQHandler</activation-config-property-name>
                          <activation-config-property-value>org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>DLQJNDIName</activation-config-property-name>
                          <activation-config-property-value>queue/DLQ</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>DLQMaxResent</activation-config-property-name>
                          <activation-config-property-value>1</activation-config-property-value>
                       </activation-config-property>
                       <activation-config-property>
                          <activation-config-property-name>PreAcknowledge</activation-config-property-name>
                          <activation-config-property-value>true</activation-config-property-value>
                       </activation-config-property>
                    </activation-config>
                    <endpoint-interceptors>
                      <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
                      <interceptor>org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor</interceptor>
                      <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
                      <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
                    </endpoint-interceptors>
                  </proxy-factory-config>
                </invoker-proxy-binding>

                <!-- Uncomment to use JMS message inflow from jmsra.rar -->

                <invoker-proxy-binding>

                  <name>message-driven-bean</name>

                  <invoker-mbean>default</invoker-mbean>

                  <proxy-factory>org.jboss.ejb.plugins.inflow.JBossJMSMessageEndpointFactory</proxy-factory>

                  <proxy-factory-config>

                    <activation-config>

                       <activation-config-property>

                          <activation-config-property-name>providerAdapterJNDI</activation-config-property-name>

                          <activation-config-property-value>DefaultJMSProvider</activation-config-property-value>

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>minSession</activation-config-property-name>

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

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>maxSession</activation-config-property-name>

                          <activation-config-property-value>15</activation-config-property-value>

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>keepAlive</activation-config-property-name>

                          <activation-config-property-value>60000</activation-config-property-value>

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>maxMessages</activation-config-property-name>

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

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>reconnectInterval</activation-config-property-name>

                          <activation-config-property-value>10</activation-config-property-value>

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>useDLQ</activation-config-property-name>

                          <activation-config-property-value>false</activation-config-property-value>

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>DLQHandler</activation-config-property-name>

                          <activation-config-property-value>org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler</activation-config-property-value>

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>DLQJNDIName</activation-config-property-name>

                          <activation-config-property-value>queue/DLQ</activation-config-property-value>

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>DLQMaxResent</activation-config-property-name>

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

                       </activation-config-property>

                       <activation-config-property>

                          <activation-config-property-name>PreAcknowledge</activation-config-property-name>

                          <activation-config-property-value>true</activation-config-property-value>

                       </activation-config-property>

                    </activation-config>

                    <endpoint-interceptors>

                      <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>

                      <interceptor>org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor</interceptor>

                      <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>

                      <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>

                    </endpoint-interceptors>

                  </proxy-factory-config>

                </invoker-proxy-binding>