Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Configuration - Null Values

As of version 1.0.9 of the configuration reading bundle com.cohga.server.setup you can set a value to explicitly be null. What that mean in terms of configuration is dependent upon the context of where it's set.

To set a value to null you need to add a special namespace to the config tag, http://www.w3.org/2001/XMLSchema-instance, and then use that to set the value nil to true for the value you want to set to null.

So in the example below the overflowToDisk value will explicitly set to null

<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...

	<data:datadefinition id="...">
		<datasourcedataconnection datasource="..." table="..." key="...">
			...
			<cache id="existing.cache.config">
				<overflowToDisk xsi:nil="true"/>
			</cache>
		</datasourcedataconnection>
	</data:datadefinition>

</config>

Initially you may think that setting the value to null would appear to be the same thing as not setting the value at all, but as the example above shows what we're doing with the cache tag is to override the settings in the cache definition, which is defined elsewhere, for this particular datasourcedataconnection. So in this example the datasourcedataconnection will use the cache definition supplied by existing.cache.config but with the overflowToDisk value reset to its default. The default will be used because that's the normal handling for a cache definition where a value isn't set, other configuration items may have different interpretations of what null means for a specific value.

  • No labels