1 2 Previous Next 18 Replies Latest reply on Jan 3, 2012 5:33 PM by Stuart Douglas

    JBoss AS7.1 CR1 and JMS queues configuration troubles

    Alex Krasov Newbie

      Hi.

       

      I'm trying to migrate to AS7.1CR1 release.

       

      I have 2 JMS queues defined at standalone.xml. JBoss recognized them on first run and everything seems to be ok, but it rewrites standalone.xml without queues definition, i.e. completely ommiting the <jms-destinations> element, so after jboss restart queues don't exist anymore.

       

      I've worked with beta1 before, and everything was fine. Is this some kind of known bug or am I missing something?

       

      Thanks!

       

      EDIT: Even some trivial notes like "it works fine for me" or "me neither" will help me to better understand what's going on here...

      Thanks again

        • 1. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
          Rayan Hacker Newbie

          Hi Alex,

           

          You can have a look at the below article created on Middleware Magic, which would give you a deatiled setps and applicaiton as well to produce and consumes the messages from a Queue in JBoss AS7

           

          Topic: How to create a Queue in JBoss AS 7 ?

          http://middlewaremagic.com/jboss/?p=794

           

          You would have to use standalone-full.xml file in the above post instead of standalone-perview.xml file, becasue all the HornetQ configurations is now in standalone-full.xml and standalone-ha.xml from, other files has been removed.


          • 2. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
            jaikiran pai Master

            Alex Krasov wrote:

             

            EDIT: Even some trivial notes like "it works fine for me" or "me neither" will help me to better understand what's going on here...

            Thanks again

            Just tried it myself. It works fine for me. I don't see it being removed from the file once it's persisted. Can you explain what steps you do to add those queues and when do you see those queues going missing? What else do you do after adding the queues?

            • 3. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
              Alex Krasov Newbie

              Below is my messaging subsystem configuration.

              I don't do anything particulary special:

               

              1. I'm starting jboss, as usual (with standalone.bat). At this stage it loads as it should, with queues recognized and everything.

              2. I'm deploying something at standalone/deploy folder, no matters what, every war / jar / something will go.

              3. The standalone.xml is being rewritten by jboss, without the whole <jms-destinations> part at all.

              4. From next start and on, jboss is not creating my queues, obviously, because it doesn't have a clue it should.

               

              I'm aware about possibility to add queues throught managing cli script, it even works fine. It's just not an option for me, as I need the queues to be alive as soon as possible on initial deployed apps startup...

               

              Thanks!

               

              <subsystem xmlns="urn:jboss:domain:messaging:1.1">

                          <hornetq-server>

                              <!-- disable messaging persistence -->

                              <persistence-enabled>true</persistence-enabled>

                              <!-- Default journal file size is 10Mb, reduced here to 100k for faster first boot -->

                              <journal-file-size>1024000</journal-file-size>

                              <journal-min-files>2</journal-min-files>

                              <connectors>

                                  <netty-connector name="netty" socket-binding="messaging"/>

                                  <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                                      <param key="batch-delay" value="50"/>

                                  </netty-connector>

                                  <in-vm-connector name="in-vm" server-id="0"/>

                              </connectors>

                              <acceptors>

                                  <netty-acceptor name="netty" socket-binding="messaging"/>

                                  <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                                      <param key="batch-delay" value="50"/>

                                      <param key="direct-deliver" value="false"/>

                                  </netty-acceptor>

                                  <in-vm-acceptor name="in-vm" server-id="0"/>

                              </acceptors>

                              <security-settings>

                                  <security-setting match="#">

                                      <permission type="send" roles="guest"/>

                                      <permission type="consume" roles="guest"/>

                                      <permission type="createNonDurableQueue" roles="guest"/>

                                      <permission type="deleteNonDurableQueue" roles="guest"/>

                                  </security-setting>

                              </security-settings>

                              <address-settings>

                                  <!--default for catch all-->

                                  <address-setting match="#">

                                      <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                      <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                      <redelivery-delay>0</redelivery-delay>

                                      <max-size-bytes>10485760</max-size-bytes>

                                      <message-counter-history-day-limit>10</message-counter-history-day-limit>

                                      <address-full-policy>BLOCK</address-full-policy>

                                  </address-setting>

                              </address-settings>

                              <jms-connection-factories>

                                  <connection-factory name="InVmConnectionFactory">

                                      <connectors>

                                          <connector-ref connector-name="in-vm"/>

                                      </connectors>

                                      <entries>

                                          <entry name="java:/ConnectionFactory"/>

                                      </entries>

                                  </connection-factory>

                                  <connection-factory name="RemoteConnectionFactory">

                                      <connectors>

                                          <connector-ref connector-name="netty"/>

                                      </connectors>

                                      <entries>

                                          <entry name="RemoteConnectionFactory"/>

                                      </entries>

                                  </connection-factory>

                                  <pooled-connection-factory name="hornetq-ra">

                                      <transaction mode="xa"/>

                                      <connectors>

                                          <connector-ref connector-name="in-vm"/>

                                      </connectors>

                                      <entries>

                                          <entry name="java:/JmsXA"/>

                                      </entries>

                                  </pooled-connection-factory>

                              </jms-connection-factories>

                              <jms-destinations>

                                  <jms-queue name="StatisticsQueue">

                                      <entry name="queue/StatisticsQueue"/>

                                  </jms-queue>

                                  <jms-queue name="EmailsQueue">

                                      <entry name="queue/EmailsQueue"/>

                                  </jms-queue>

                              </jms-destinations>

                          </hornetq-server>

                      </subsystem>

              • 4. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                Alex Krasov Newbie

                Thanks.

                 

                I know how to configure HornetQ and add queues, I'm actually done it successfully with JBoss7.0.2 and JBoss 7.1beta1.

                It's something that happened after updating to 7.1.CR1...

                 

                The administrative CLI script is a no-go approach for me either, I have to do it with persistent configuration.

                 

                What else could it be?

                • 5. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                  jaikiran pai Master

                  Alex Krasov wrote:

                   

                   

                  1. I'm starting jboss, as usual (with standalone.bat). At this stage it loads as it should, with queues recognized and everything.

                  ...

                  3. The standalone.xml is being rewritten by jboss, without the whole <jms-destinations> part at all.

                  AS 7.1.0.CR1 has no messaging (HornetQ) subsystem in standalone.xml. You'll have to use the standalone-full.xml:

                   

                  ./standalone.bat -server-config=standalone-full.xml

                  • 6. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                    Alex Krasov Newbie

                    I know that the initial standalone.xml doesn't have the HornetQ subsystem, that's my own standalone.xml I'm talking about.

                    I've added the messaging subsystem, datasource, logging configuration and more.

                    It's just called standalone.xml, I'm not talking about the initial version of standalone.xml...

                    I've even included my messaging subsystem configuration at previous reply.

                    Again, it works at first run, the subsystem itself also being persisted fine.

                    It's only the <jms-destinations>...</jms-destinations> part that disappears.

                     

                    BTW: Out of curiosity I've also tried to rename it to my.xml and started with -server-config=my.xml, same troubles...

                    • 7. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                      jaikiran pai Master

                      Alex Krasov wrote:

                       

                      I know that the initial standalone.xml doesn't have the HornetQ subsystem, that's my own standalone.xml I'm talking about.

                      I've added the messaging subsystem, datasource, logging configuration and more.

                      It's just called standalone.xml, I'm not talking about the initial version of standalone.xml...

                      Without seeing your entire standalone.xml file (please attach) I can't say what's wrong. As an alternate approach you can try using the standalone-full.xml by removing out any subsystem that you don't use. See if that works. That'll probably tell us whether it's something that you are missing in your standalone.xml.

                      • 8. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                        Alex Krasov Newbie

                        Here is my standalone.xml, thanks.

                         

                        BTW: I've fully rewritten it from standalone-full, altering the relevant parts.

                        Same troubles, unfortunately...

                        • 9. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                          Alex Krasov Newbie

                          Is there something to do about or shall I just wait for CR2 / GA? I'm kind of stuck with beta1 and can't upgrade to CR1 because of this...

                          Thanks.

                          • 10. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                            Andrew Regan Newbie

                            I'm seeing the same issue as Alex.

                             

                            CR1 starts up fine, but then removes the <jms-destinations> entries from the standalone.xml, so that if I restart the server without remembering to restore the entries, JMS is broken. It's not a big issue, just one more thing to remember to do.

                             

                            I've successfully run with 7.1a3 and 7.1b1, so there's nothing wrong with my standalone.xml (I'm certainly not going to rebuild it from scratch). Shall I attach it? This definitely looks like a bug...

                            • 11. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                              jaikiran pai Master

                              I haven't yet checked Alex's standalone.xml that he attached. Will do it soon. Last time I checked with the standalone-full.xml that's shipped in 7.1.0.CR1, I did not see this issue. I'll recheck again.

                              • 12. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                                markus78 Newbie

                                I have this issue to, i think it was introduced in CR1, im on CR1b now and jms-destination gets stripped once JBoss rewrites the file.

                                 

                                /M

                                • 13. Re: JBoss AS7.1 CR1 and JMS queues configuration troubles
                                  Don Couture Newbie

                                  Just to add to the me too's.  I have the same issue using standalone-ha.xml

                                  1 2 Previous Next