Default Parameters

The XML datacontrol is highly pluggable and its behaviour can be customised with providers that provide certain functionality. These can be some of the included providers or you can create your own. Most providers will need some sort of parameters to configure their behaviour. A good example is the endpoint URL for a SOAP webservice data provider. Most of the times these parameters will be declared in the DataControls.dcx file where the provider itself is also specified. Most pages in this wiki give examples of this.

But sometimes it makes sense to set or override global defaults for some provider parameters. For example, you might want to set the requestTimeout for web service data providers to a default of 5 seconds. You could still override this for individual data controls but having a sensible default makes sense over specifying this for each and every data control. Here is how each provider finds the values for its parameters in order::

  1. The explicit value for the parameter in the DataControls.dcx
  2. The default value specified in a web.xml context-param. This can be used to set application wide default and canbe overridden with a weblogic deployment plan to make this default configurable per environment (development and production)
    1. The name of this context-param has to be the name of the provider class joined with the name of the parameter, for example org.adfemg.datacontrol.xml.provider.data.WSDataProvider.requestTimeout for the default requestTimeout for each webservice dataprovider. If you would subclass the WSDataProvider to create your own custom webservice data provider it would still use this context param name and not the class name of your subclass. You could use a similar mechanism to lookup defaults specific to your subclass. For more details see the source code for the existing data providers and their super class org.adfemg.datacontrol.xml.provider.ProviderImpl
  3. The default value specified as a system property. This can be used to set system wide defaults for all applications running on the same managed server that is started with this command line parameter.
    1. The name of this system property follows the same rules as the name of the context-param in the previous step, eg. the class name concatenated with the parameter name and separated by a period.
  4. The default value as hardcoded in the provider and documenten on the wiki or in the source code
  5. null