JBoss.orgCommunity Documentation

Chapter 6. Configuration

6.1. Appserver Configuration
6.2. ErraiApp.properties
6.3. ErraiService.properties
6.3.1. errai.dispatcher.implementation
6.3.2. errai.async_thread_pool_size
6.3.3. errai.async.worker_timeout
6.3.4. errai.authentication_adapter
6.3.5. errai.require_authentication_for_all
6.3.6. errai.auto_discover_services
6.3.7. errai.auto_load_extensions
6.4. Dispatcher Implementations
6.4.1. SimpleDispatcher
6.4.2. AsyncDispatcher
6.5. Servlet Implementations
6.5.1. DefaultBlockingServlet
6.5.2. GrizzlyCometServlet
6.5.3. JBossCometServlet
6.5.4. JettyContinuationsServlet
6.5.5. StandardAsyncServlet (Errai 2.0)
6.5.6. TomcatCometServlet
6.5.7. WeblogicAsyncServlet

This section contains information on configuring Errai.

Depending on what application server you are deploying on, you must provide an appropriate servlet implementation if you wish to use true, asynchronous I/O. See Section 6.5, “Servlet Implementations” for information on the available servlet implementations.

Here's a sample web.xml file:

<web-app xmlns="http://java.sun.com/xml/ns/javaee"







The ErraiApp.properties acts as a marker file. When it is detected inside a JAR or at the top of any classpath, the subdirectories are scanned for deployable components. As such, all Errai application modules in a project should contain an ErraiApp.properties at the root of all classpaths that you wish to be scanned.

The file can also include explicitly declared serializable types (such as those from third-party code) that cannot be annotated for serialization. (See the section on serialization for more details)

errai.bus.serializableTypesDefines a list of serializable types to expose to the bus.

he ErraiService.properties file contains basic configuration for the bus itself.

Example Configuration:

Dispatchers encapsulate the strategy for taking messages that need to be delivered somewhere and seeing that they are delivered to where they need to go. There are two primary implementations that are provided with Errai, depending on your needs.

Errai has several different implementations for HTTP traffic to and from the bus. We provide a universally-compatible blocking implementation that provides fully synchronous communication to/from the server-side bus. Where this introduces scalability problems, we have implemented many webserver-specific implementations that take advantage of the various proprietary APIs to provide true asynchrony.

These included implementations are packaged at: org.jboss.errai.bus.server.servlet .