properties files priority?

1 view
Skip to first unread message

bjohnson

unread,
Oct 29, 2019, 2:08:07 PM10/29/19
to orb...@googlegroups.com
I'm a little confused about how these properties files work, and how the
properties are named.

Is there a precedence to these properties files? i.e. if I see a property
in the properties-form-runner.xml and have the same property in
properties-local.xml, does properties-local always override the one from the
properties-form-runner.xml file?

Is it a full override or more of an "AND" or some other logical evaluation?

Is there a way to determine what properties can be overridden in
properties-local.xml and which ones cannot?

I've noticed that some properties in properties-local.xml are parsed/enabled
as soon as the file is saved and the users's browser is refreshed. Some
require a restart of the service. Is there a way to determine which ones
work which way?

I see properties-form-runner.xml in the installed .war compressed file.
Does having another version of that file in the install folder
(uncompressed) override any or all of the properties in the .war? Will it
only override properties that exist in the file and leave the others intact,
or do i need to include all properties from properties-form-runner.xml in
the uncompressed version of the file?

Thanks.

--
Sent from: http://discuss.orbeon.com/

Alessandro Vernet

unread,
Oct 31, 2019, 2:10:52 PM10/31/19
to orb...@googlegroups.com
Hi,

Properties in your `properties-local.xml` override the default values of
properties (e.g. in `properties-form-runner.xml`,
`properties-form-builder.xml`, etc). Also, with properties accepting
wildcards (`*`), more specific properties override less specific properties
(see 1st link below). You can override all properties in
`properties-local.xml`, even if we don't recommend you override properties
defined in `properties-internal.xml`. In general, you don't need to restart
your server for properties to be taken into account. There are very few
exceptions to this rule, and the only one that comes to mind is properties
used to override resources (see 2nd link below). Finally, you can override
entire files: if you have the same path/file in multiple resources
locations, the one with the lowest priority as defined with the
`oxf.resources.priority` parameters in your `web.xml` (or with Tomcat a
`<Parameter>` inside the `<Context>`) will take precedence. Does this answer
your questions?

https://doc.orbeon.com/configuration/properties/#wildcards-in-properties
https://doc.orbeon.com/configuration/properties/form-runner#overriding-resources

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet

bjohnson

unread,
Oct 31, 2019, 3:30:12 PM10/31/19
to orb...@googlegroups.com
YES! Thank you for explaining this, Alex. It's good to know we can override
any property from properties-local.xml. I had tried to override properties
by duplicating the other properties files in my installation and it wasn't
working. Maybe I wasn't duplicating the same path.

bjohnson

unread,
Oct 31, 2019, 3:30:41 PM10/31/19
to orb...@googlegroups.com
YES! Thank you for explaining this, Alex. It's good to know we can override
any property from properties-local.xml. I had tried to override properties
by duplicating the other properties files in my installation and it wasn't
working. Maybe I wasn't duplicating the same path.

Alessandro Vernet

unread,
Oct 31, 2019, 6:43:30 PM10/31/19
to orb...@googlegroups.com
Perfect, I'm glad that helped. And it's really better to just override
resources in the `properties-local.xml`, as this will make upgrading easier
for you in the future.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply all
Reply to author
Forward
0 new messages