WildFly Paths

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

WildFly uses logical names for filesystem paths. All top-level configuration files standalone.xml, domain.xml and host.xml include a <paths> section for declaring paths. Closer declaration to the server take precedence.

WildFly Standard Paths

WildFly Standard Paths

relative-to

"relative-to" attribute references a global path name in the domain model.

Adding Custom Paths

We can add more named paths, so we can use them as "relative-to". They are added as follows:

<server ...>
   <extensions>
      ...
   </extensions>

   <paths>
      <path name="hornetq.shared.dir" path="C:/tmp/hqd"/>
   </paths>
   ...

</server>

In the above example, "hornetq.shared.dir" can be used as path name for "relative-to" used in HornetQ configuration.


!!!PathManagerService and HornetQ


PathManagerService is used to resolve configuration entries specified in the format:

{{{

  ... 
  <bindings-directory path="./bindings" relative-to="jboss.server.base.dir"/>
  ...

}}}

or


{{{

  ... 
  <bindings-directory path="./bindings" relative-to="hornetq.shared.dir"/>
  ...

}}}


HornetQ configuration does its own path processing, and supplies default values for "relative-to" if that is not specified. That default value is "jboss.server.data.dir" (HornetQServerAdd.DEFAULT_RELATIVE_TO). It does not really matter if the "path" attribute value is relative or absolute, it will be always be considered relative to "relative-to".

!!!PathManagerService Implementation

The path roots are added at boot within ServerPathManagerService (that extends PathManagerService). This is where the "path names" and their absolute values are added.


__Referenced by:__\\ [{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=20, maxwidth=50}]