+

Search Tips   |   Advanced Search

Connection factory JNDI name practices


Observe the conventions of the Java™ Naming and Directory Interface (JNDI) service in WAS when creating connection factory JNDI names.

Distributed computing environments often employ naming and directory services to obtain shared components and resources. Naming and directory services use name-to-object mappings to associate names with objects such locations, services, information, and resources. The JNDI provides a common interface used to access the various naming and directory services.

 

Naming the resources indirectly

When creating a connection factory or data source, a JNDI name is given by which the connection factory or data source can be looked up by a component. WAS uses an indirect name with the java:comp/env prefix:

If we override these values by specifying the own, retain the java:comp/env prefix. An indirect name makes any resource-reference data associated with the application available to the connection management runtime, to better manage resources based on the res-auth, res-isolation-level, res-sharing-scope, and res-resolution-control settings.

 

Naming the resources for use with CMP

In addition, if we click the checkbox for the Use this data source for container managed persistence (CMP) option when creating the data source, another reference is created with the name of eis/jndi_name_of_datasource_CMP. For example, if a data source has a JNDI name of jdbc/myDatasource, the CMP JNDI name is eis/jdbc/myDatasource_CMP. This name is used internally by CMP and is provided simply for informational purposes.



Related concepts


Data sources