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/
ok. thank you!
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 :
<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"/>
when the the Process and Host Controllers are started, I do correctly see the following on my filesystem :
jbride@ratwaterIBM ~ $ du -sh /tmp/hornetq/*
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/*
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
Can you try AS7 standalone mode also and see what's the result?
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.
No problem. Glad you sorted it out.
1 of 1 people found this helpful
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"
nice idea .... thanks Andrew!
What is the root reason of that cannot use absolute paths in JBoss AS 7?
This is a question for the AS7 forum.