17.3.2. Configuring a DataSource for Remote Usage
Example 17.5. Configuring a Datasource for Remote Usage
<datasources> <local-tx-datasource> <jndi-name>GenericDS</jndi-name> <use-java-context>false</use-java-context> <connection-url>...</connection-url> ...
GenericDSinstead of the default of
java:/GenericDS, which restricts the lookup to the same Virtual Machine as the EAP server.
<use-java-context>setting is not recommended in a production environment. It requires accessing a connection pool remotely and this can cause unexpected problems, since connections are not serializable. Also, transaction propagation is not supported, since it can lead to connection leaks if unreliability is present, such as in a system crash or network failure. A remote session bean facade is the preferred way to access a datasource remotely.