10 Replies Latest reply on Jan 11, 2013 9:11 AM by jbertram

    absolute path for journal-directory in AS7.1.2.Final

    jbride

      Hi,

        wondering if anyone can provide an example of setting the location of the journal-directory to an absolute path in AS 7 ?

        For example, in AS7.1.2.Final ... the following :

       

      <journal-directory path="/u01/hornetq/journal" />

       

      .... actually ends up creating the hornetq journal in $JBOSS_HOME/standalone/data/u01/hornetq/journal

       

       

      thank you,

       

      jeff

        • 1. Re: absolute path for journal-directory in AS7.1.2.Final
          gaohoward

          I'm afraid you cannot use absolute paths. However you can achieve this by setting the relative-to attribute, like

           

          <journal-directory path="../../u01/hornetq/journal" relative-to="user.home" />

           

          suppose your home dir is /home/foo/

          • 2. Re: absolute path for journal-directory in AS7.1.2.Final
            jbride

            ok.  thank you!

            • 3. Re: absolute path for journal-directory in AS7.1.2.Final
              jbride

              Hi Yong,

                related question that you may have insite into:

                following your instructions above, I am making appropriate adjustments to domain.xml of AS 71.2.Final  as per the following :

               

               

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

                              <hornetq-server>

                                  <paging-directory path="../../tmp/hornetq/paging" relative-to="user.home"/>

                                  <bindings-directory path="../../tmp/hornetq/bindingsAndLargeMessages" relative-to="user.home"/>

                                  <journal-directory path="../../tmp/hornetq/journal" relative-to="user.home"/>

                                  <large-messages-directory path="../../tmp/hornetq/bindingsAndLargeMessages" relative-to="user.home"/>

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

                                  <journal-file-size>102400</journal-file-size>

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

               

                                    .....

               

              when the the Process and Host Controllers are started, I do correctly see the following on my filesystem :

               

              jbride@ratwaterIBM ~ $  du -sh /tmp/hornetq/*

              3.1M          /tmp/hornetq/bindingsAndLargeMessages

              208K          /tmp/hornetq/journal

               

              however, I've noticed that messages never get persisted in /tmp/hornetq  as hoped.

               

              instead, in my case I provision an additional AS7 server called:   "lab" . 

              it's in the data directory of this "lab" server where all messages are being journalled and paged. 

              Example as follows after delivering 1000 messages of  10k size each :

               

              jbride@ratwaterIBM /shared/source/jboss/jbossas/jboss-as/build/target/jboss-as-7.1.2.Final ((7.1.2.Final)) $ du -sh domain-lab/servers/lab/data/*

              4.0K          domain-lab/servers/lab/data/content

              4.1M          domain-lab/servers/lab/data/messagingbindings

              6.5M          domain-lab/servers/lab/data/messagingjournal

              4.0K          domain-lab/servers/lab/data/messaginglargemessages

              94M          domain-lab/servers/lab/data/messagingpaging

              4.0K          domain-lab/servers/lab/data/timer-service-data

              12K          domain-lab/servers/lab/data/tx-object-store

               

              in particular, please notice the directory path of where the hornetq filesystem being used is :    $JBOSS_HOME/domain-lab/servers/lab/data

              the hornetq filesystem of "/tmp/hornetq" originally configured in domain.xml stays the original size.

               

               

              are the "paging-directory", "journal-directory",  "bindings-directory" and "large-messages-directory"  attributes suppose to be configured somewhere other than in the "messaging" subsystem of domain.xml ??

               

              thank you,  jeff

              • 4. Re: absolute path for journal-directory in AS7.1.2.Final
                gaohoward

                Can you try AS7 standalone mode also and see what's the result?

                 

                Howard

                • 5. Re: absolute path for journal-directory in AS7.1.2.Final
                  jbride

                  please disregard Howard.  sorry about the confusion.

                  turns out i was configuring my server to use the 'full-ha' profile but adding the 'paging-directory', 'journal-directory', etc xml configurations to the 'full' profile of domain.xml .

                  now that those XML changes are in the full-ha profile, messages are being written to the expected directories.

                   

                  jeff

                  • 6. Re: absolute path for journal-directory in AS7.1.2.Final
                    gaohoward

                    No problem. Glad you sorted it out.

                    • 7. Re: absolute path for journal-directory in AS7.1.2.Final
                      acollins

                      You can also get around this by declaring a custom global path in your configuration file "paths" block,

                       

                      <path name="custom.global.path" path="/u01/hornetq" />

                       

                      then using this as the "relative-to" value in your "journal-directory" element:

                       

                      <journal-directory path="journal" relative-to"custom.global.path" />

                       

                      This will place your messaging files in the desired "/u01/hornetq/journal" location that you want, without having to backtrace from "user.home"

                      1 of 1 people found this helpful
                      • 8. Re: absolute path for journal-directory in AS7.1.2.Final
                        jbride

                        nice idea .... thanks Andrew!

                        • 9. Re: absolute path for journal-directory in AS7.1.2.Final
                          zhouqikun

                          What is the root reason of that cannot use absolute paths in JBoss AS 7?

                          • 10. Re: absolute path for journal-directory in AS7.1.2.Final
                            jbertram

                            This is a question for the AS7 forum.