Skip to end of metadata
Go to start of metadata

ErraiApp.properties acts both as a marker file for JARs that contain Errai-enabled GWT modules, and as a place to put configuration settings for those modules in the rare case that non-default configuration is necessary.

As a Marker File

An ErraiApp.properties file must appear at the root of each classpath location that contains an Errai module. The contents of JAR and directory classpath entries that do not contain an ErraiApp.properties are effectively invisible to Errai's classpath scanner.

As a Configuration File

ErraiApp.properties is usually left empty, but it can contain configuration settings for both the core of Errai and any of its extensions. Configuration properties defined and used by Errai components have keys that start with "errai.". Third party extensions should each choose their own prefix for keys in ErraiApp.properties.

Configuration Merging

In a non-trivial application, there will be several instances of ErraiApp.properties on the classpath (one per JAR file that contains Errai modules, beans, or portable classes).

Before using the configuration information from ErraiApp.properties, Errai reads the contents of every ErraiApp.properties on the classpath. The configuration information in all these files is merged together to form one set of key=value pairs.

If the same key appears in more than one ErraiApp.properties file, only one of the values will be associated with that key. The other values will be ignored. In future versions of Errai, this condition may be made into an error. It's best to avoid specifying the same configuration key in multiple ErraiApp.properties files.

Errai Marshalling Configuration

  • errai.marshalling.use_static_marshallers when set to false, Errai will not use the precompiled server-side marshallers even if the generated ServerMarshallingFactoryImpl class is found on the classpath. This is useful when using Dev Mode in conjunction with an external server such as JBoss AS 7 or EAP 6.
  • errai.marshalling.force_static_marshallers when set to true, Errai will not use dynamic marshallers. If the generated ServerMarshallingFactoryImpl cannot be loaded (possibly after an attempt to generate it on-the-fly), the Errai web app will fail to start.

Errai also supports configuring portable types in ErraiApp.properties as an alternative to the @Portable annotation. See the Errai Marshalling section on Manual Mapping for details.

Errai IoC Configuration

  • errai.ioc.QualifyingMetaDataFactory specifies the fully-qualified class name of the QualifyingMetadataFactory implementation to use with Errai IoC.
  • errai.ioc.enabled.alternatives specifies a whitespace-separated list of fully-qualified class names for alternative beans. See Alternatives and Mocks for details.
  • errai.ioc.blacklist specifies a whitespace-separated list of classes that should be hidden from Errai IOC and that will be excluded when generating the bean graph and wiring components. Wildcards are supported to exclude all types underneath a package e.g. org.jboss.myapp.exclude.* (all types under the exclude package will be hidden from ERRAI IOC).
  • errai.ioc.whitelist when this property is present all types in your application are hidden from Errai IOC by default. It specifies a whitespace-separated list of classes that should be visible to IOC and that will be included when generating the bean graph and wiring components. Wildcards are supported to include all types underneath a package e.g. org.jboss.myapp.include.* (all types under the include package will be visible to ERRAI IOC).

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.