System Configuration

The default system-config.xml is packaged inside war: WEB-INF/system-config.xml. It can be overridden by creating system-config.xml under [cmobilecom.home]/conf.

System configuration defines the modules to load and configures the InstanceTypes that are composed of modules. Exactly one system InstanceType is required. Subsystem InstanceTypes are optional, and multiple subsystem InstanceTypes can be configured.

See System Config XML Schema for detail.

For example,


    <a href="" target="_blank"></a> ]]>	
  <!-- supported locales -->
  <property name="supported.locales" value="en,zh_CN"/>

  <!-- the resource bundle base name in addition to
	   framework resources.messages and module bundles [moduleName].resources.messages
  <property name="resource.bundle.basename" value="my.resources.messages"/>  -->
  <!-- override default EntityPropertyFactory
  <property name="" value="mypackage.EntityPropertyFactoryImpl"/>  -->  

  <!-- transaction type: JTA or RESOURCE_LOCAL. 
  	Default: JTA if Java EE, RESOURCE_LOCAL for Java SE without JTA support.
  	Must match META-INF/persistence.xml. -->
  <property name="transaction.type" value="RESOURCE_LOCAL"/> 

  <!-- If transaction.type is JTA, specify JTA transaction implementation class. 
  <property name="jta.transaction.class" value="mypackage.JTATransaction"/> 
  <!-- whether to show entity version to help debug with optimistic locking -->
  <property name="show.entity.version" value="true"/> 
  <!-- responsive.type: auto, mobile, desktop. default is auto. -->
  <property name="responsive.type" value="auto"/>
  <module name="System">
  <module name="ExampleHR">
     <param name="paramName" value="paramValue"/>
  <instance-type id="system" name="CmobilecomAF">
    <module-node module="System"/>
  <instance-type id="AFEX" name="CmobilecomAFExamples">

    <module-node module="ExampleHR"/>
    <module-node module="System"/>
    <param name="supported.locales" value="en"/>
The description is a piece of html code that will be shown under the About/Application in the Help menu. It can contain bundle expressions such as #{bundle.Key}.

A parameter in an InstanceType will override its corresponding global property setting with the same name if applicable. Properties:

This example defines ExampleHR and system modules. The order of loading modules is important if there is any dependency between modules. One system InstanceType and one subsystem InstanceType are configured. Each InstanceType defines name, version, logo, icon, and tree-structured module nodes.

A module node refers to a defined Module and can have child module nodes.

	<module-node module="ModuleA">
		<module-node module="ModuleB" visible-name="ModuleVisibleName"
			parent-menu-node="MenuNode5/MenuNode6" position="8"

			<menu-node-factory name="MenuNodeFactoryName1">

			<menu-node-factory name="MenuNodeFactoryName2">

			<param name="paramName" value="paramValue"/>


Module Groups

A module can define groups so that the module can be partially assembled into an InstanceType. For example, module Bar define group 1, 2, and 3. assembly the group 2 and 3 of the module Bar into the InstanceType Foo.

	<instance-type id="01" name="Foo">
		<module-node module="Bar"/>
		<module-groups module="Bar">
The module groups are used to partition entity type O/R mapping, and will be passed to the Module API methods when called. see Module Development.

System or Subsystem

Should any subsystem InstanceType be configured? For a subsystem InstanceType, many instances can be created. Subsystem instances can be exported and imported. But for the system InstanceType, only one instance. It can not be exported or imported.

If there are subsystem InstanceTypes configured, then a MenuNode of Instances will be in the System module for managing subsystem instances. They will be available for selection during login. Users can login into a subsystem instance directly.