Skip to end of metadata
Go to start of metadata

Application Client Migration

Naming Client

This migration example assumes a client application performs a remote JNDI lookup using an InitialContext backed by the org.jboss.naming.remote.client.InitialContextFactory class.

Original Configuration

An InitialContext backed by the org.jboss.naming.remote.client.InitialContextFactory class can be created by specifying properties that contain the URL of the naming provider to connect to along with appropriate user credentials:

Migrated Configuration

An InitialContext backed by the org.wildfly.naming.client.WildFlyInitialContextFactory class can be created by specifying a property that contains the URL of the naming provider to connect to. The user credentials can be specified using a WildFly client configuration file or programmatically.

Configuration File Approach

A wildfly-config.xml file that contains the user credentials to use when establishing a connection to the naming provider can be added to the client application's META-INF directory:

wildfly-config.xml

An InitialContext can then be created as follows:

Programmatic Approach

The user credentials to use when establishing a connection to the naming provider can be specified directly in the client application’s code:

EJB Client

This migration example assumes a client application is configured to invoke an EJB deployed on a remote server using a jboss-ejb-client.properties file.

Original Configuration

A jboss-ejb-client.properties file that contains the information needed to connect to the remote server can be specified in a client application’s META-INF directory:

jboss-ejb-client.properties

An EJB can then be looked up and a method can be invoked on it as follows:

Migrated Configuration

The information needed to connect to the remote server can be specified using a WildFly client configuration file or programmatically.

Configuration File Approach

A wildfly-config.xml file that contains the information needed to connect to the remote server can be added to the client application's META-INF directory:

wildfly-config.xml

An EJB can then be looked up and a method can be invoked on it as follows:

Programmatic Approach

The information needed to connect to the remote server can be specified directly in the client application’s code:

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