5 Replies Latest reply: Nov 22, 2011 6:08 PM by Brian Stansberry RSS

Configuring sub-systems with relative-to property

Jeremy Whiting Apprentice

Hi,

  I am configuring a couple of sub-systems to change the location files are stored. They are transactions and messaging. This post will stick to transactions to keep it simple. Though the same issue is relevant for messaging.

 

After some testing it seems the relative-to property resolving is not working as expected.

 

I want the transactions files to be stored in this location

 

/mnt/disk-b/as7/tx-object-store

 

 

I am running standalone sever and as7 built from master branch as the 06/Oct.

This is the transactions sub system config.

 

 

 

 

Adding the below property in standalone.conf is not good enough,

 

-Dtx-dir=/mnt/disk-b/as7

 

 

AS7 gives an unsatisfied dependency error

 

New missing/unsatisfied dependencies:

      service jboss.server.path.tx-dir (missing)

 

 

 

Replacing the property with

 

-Djboss.server.path.tx-dir=/mnt/disk-b/as7

 

 

still causes AS7 to report an unsatisfied dependency error.

 

 

 

Is there something I have missed that needs to be done ?

 

Regards,

Jeremy

  • 1. Re: Configuring sub-systems with relative-to property
    Jeremy Whiting Apprentice

    This is the transactions sub system config.

     

    <subsystem xmlns="urn:jboss:domain:transactions:1.0">

       <core-environment>

           <process-id>

               <uuid/>

           </process-id>

       </core-environment>

       <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

       <coordinator-environment default-timeout="300"/>

       <object-store relative-to="tx-dir" path="tx-object-store"/>

    </subsystem>

  • 2. Re: Configuring sub-systems with relative-to property
    Kabir Khan Master

    THis may or may not be the answer :-), but Brian did some work on relative paths which was merged a few days ago: https://github.com/jbossas/jboss-as/pull/431

  • 3. Re: Configuring sub-systems with relative-to property
    Jeremy Whiting Apprentice

    I will pull that and try it out.

     

    Jeremy

  • 4. Re: Configuring sub-systems with relative-to property
    Jeremy Whiting Apprentice

    With the changes I have found the path attribute now works. Completely removing the relative-to attribute is necessary.

     

    To declare an absolute path specify the whole path in the path attribute. Before the commit by Brian setting the whole path in the path attribute had not worked.

     

    The following XML  will now achieve what was set out earlier as the objective.

     

     

    <subsystem xmlns="urn:jboss:domain:transactions:1.0">

       <core-environment>

           <process-id>

               <uuid/>

           </process-id>

       </core-environment>

       <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

       <coordinator-environment default-timeout="300"/>

       <object-store path="/mnt/disk-b/as7/tx-object-store"/>

    </subsystem>

     

    Many thanks,

    Jeremy

  • 5. Re: Configuring sub-systems with relative-to property
    Brian Stansberry Master

    Regarding your initial post, you cannot set up a path using a system property. You need to add a <path> element in standalone.xml, domain.xml or host.xml.

     

    As discussed in the xsd, the AS creates a few standard paths with either default values or values driven by system properties. Those are for things like the location of the configuration dir; generally things that need to be known before parsing the configuration file can even be done. But there is no general feature where we analyze system properties for a particular pattern and if found create paths from those.