Home > Documentation > Creating deployment plans > Creating deployment plans for applications > Naming (JNDI) > JNDI environment references |
Resources referenced by JNDI names often must be mapped into the names of the resources as deployed in the server. This allows resource programmers to choose names without regard to the server's configuration. Deployment plans contain the information necessary to map the names chosen to resources deployed in the server.
References must be defined in the following order.
Use the <ejb-ref> to map a reference to an EJB's remote home interface. Choose one of the following templates.
Choose this template when the referenced remote home interface can be found by searching in your module's EAR (when the module is included in an EAR) or your module's <dependencies>.
where
java:/comp/env/name
and it should map to the ejb-ref-name
provided in the Java EE deployment descriptor.Choose this template when the referenced remote home interface can only be found with additional selection criterion. For example, if the remote home interface name is not unique within your module's EAR (when the module is included in an EAR) or your module's <dependencies> this template will remove any ambiguity.
where
java:/comp/env/name
and it should map to the ejb-ref-name
provided in the Java EE deployment descriptor.Use the <ejb-local-ref> to map a reference to an EJB's local home interface. Choose one of the following templates.
Choose this template when the referenced local home interface can be found by searching in your module's EAR (when the module is included in an EAR) or your module's <dependencies>.
where
java:/comp/env/name
and it should map to the ejb-ref-name
provided in the Java EE deployment descriptor.Choose this template when the referenced remote home interface can only be found with additional selection criterion. For example, if the remote home interface name is not unique within your module's EAR (when the module is included in an EAR) or your module's <dependencies> this template will remove any ambiguity.
where
java:/comp/env/name
and it should map to the ejb-ref-name
provided in the Java EE deployment descriptor.Use the <service-ref> element to map a reference to a Web service. Choose one of the following templates.
Use this template when the WSDL for the referenced Web service is complete. This reference will target only the ports listed.
where
java:/comp/env/name
and it should map to the service-ref-name
provided in the Java EE deployment descriptor.Use this template when the WSDL for the referenced service is not complete. The elements specified here will provide the information needed to complete the WSDL.
where
java:/comp/env/name
and it should map to the service-ref-name
provided in the Java EE deployment descriptor.Use the <resource-ref> element to map a reference to a URL or a connector's connection factory Choose one of the following templates.
Choose this template when the reference is for a URL.
where
java:/comp/env/name
and it should map to the resource-ref-name
provided in the Java EE deployment descriptor.Choose this template when the reference is used to find a connection factory that can be found by searching in your module's EAR (when the module is included in an EAR) or your module's <dependencies>. Typically, this will be a JDBC or JMS connection factory, but it could be any connection factory from a Java EE connector with an <outbound-resourceadapter>.
where
java:/comp/env/name
and it should map to the resource-ref-name
provided in the Java EE deployment descriptor.Choose this template when the referenced connection factory can only be found with additional selection criterion. For example, if the connection factory name is not unique within your module's EAR (when the module is included in an EAR) or your module's <[dependencies> this template will remove any ambiguity.
where
java:/comp/env/name
and it should map to the resource-ref-name
provided in the Java EE deployment descriptor.Use the <resource-env-ref> to map a reference to a Java connector's administered object. If you are deploying an asset that uses Java EE 1.3 conventions for its Java EE deployment descriptors, this can also be used to map JMS topics and queues, but for any asset that follows Java EE 1.4 connections or better, the <message-destination> element should be used instead.
Choose this template when the reference is used to find an administered object that can be found by searching in your module's EAR (when the module is included in an EAR) or your module's <dependencies>.
where
java:/comp/env/name
and it should map to the resource-ref-name
provided in the Java EE deployment descriptor.Choose this template when the referenced administered object can only be found with additional selection criterion. For example, if the administered object name is not unique within your module's EAR (when the module is included in an EAR) or your module's <dependencies>, this template will remove any ambiguity.
where
java:/comp/env/name
and it should map to the resource-ref-name
provided in the Java EE deployment descriptor.Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |