Show TOC Start of Content Area

Procedure documentation Defining Server Component References  Locate the document in its SAP Library structure

Use

You can define a reference from your Web application to the J2EE Engine interface or service components. This way, components of your referring application can look up server components and use their functions.

You define this reference using the web-j2ee-engine.xml and the application-j2ee-engine.xml descriptors.

Procedure

On the web-j2ee-engine.xml screen of your Web Module project, proceed as follows:

       1.      Open the References screen.

       2.      Select jndi mapping and choose Add to add a new server component reference.

       3.      Enter the name of the reference in the Application local JNDI name field. This is the name that you use in your servlet (or JSP) code to look up that component. It is relative to the java:comp/env context.

       4.      Enter the name with which this component is bound to the J2EE Engine Naming System in the Server global JNDI name field.

       5.      Choose the type of the reference in the Server component type field. The types can be service or interface depending on the referenced component type.

       6.      Optionally, enter a description in the Description field.

Note

After this step, you have defined the reference that is to be bound to your web application’s naming environment. However, to be able to load classes of the referenced server component, you must also set a reference on a classloader level. That is, you must set a reference to the corresponding server component in the application-j2ee-engine.xml descriptor in your Enterprise Application Project. For more information, see Editing Application References.

End of Content Area