Show TOC Start of Content Area

Procedure documentation Configuring Resource Environment Entries  Locate the document in its SAP Library structure

Use

Resource environment entries refer to objects that have an association with a resource. On the J2EE Engine, you can set the following types of entries:

·        javax.jms.Queue

·        javax.jms.Topic

Procedure

On the web.xml screen, proceed as follows:

...

       1.      Open the Resource screen.

       2.      Select Resource Environment Entries and choose Add.

       3.      Select the added entry and provide the following information in the fields on the right-hand side:

                            a.      Enter the name of the resource environment entry reference in the Resource Environment Reference Name. This is the name that you use in your servlet (or JSP) code to look up that resource. It is relative to the java:comp/envcontext.

Note

The name you specify in this field may not be the real JNDI name of the resource environment entry you are referencing. If this is the case, you must additionally perform the steps described below in “Mapping the Reference Name to the JNDI Name of the Resource Environment Entry Using web-j2ee-engine.xml”.

                            b.      Choose the type of the resource environment entry reference from the Resource Environment Reference Type drop-down list.

                            c.      Optionally, enter a description of the reference in the Description field.

Mapping the Reference Name to the JNDI Name of the Resource Environment Entry Using web-j2ee-engine.xml

If you have specified a custom name of the reference in the Resource Environment Reference Name field in the web.xml, then you must map it to the real JNDI name with which the object is bound to the naming. This is necessary to be able to look that object up in your code.

You define the mapping using the web-j2ee-engine.xml screen of your Web Module project. Proceed as follows:

       1.      Open the web-j2ee-engine.xml screen.

       2.      Open the References screen.

       3.      Select resource-env-ref and choose Add.

       4.      From the Choose items screen that appears, choose the resource environment reference that you have defined in the web.xml.

       5.      Expand the resource-env-ref node, select the reference that you added and enter the JNDI name of the target resource environment entry object in the JNDI name field.

Note

The value you must enter to the JNDI Name field must be the same as the name of the resource environment entry that you specified in the <destination-name> tag of the jms-destinations.xml descriptor.

 

End of Content Area