Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

In order to support SAP HANA Cloud Platform Service JNDI resource lookups in EJBs with the release of neo-sdk-javaee6-wp-2.25.7, an incompatible behavior had to be introduced concerning the time destinations need to be configured.

Before this change, it was possible to configure destinations which are defined as JNDI resources of a Web application AFTER the startup of the application, and the application was then still able to resolve the destination when it was requested for the first time.

Now, all such destinations must be defined BEFORE the application is started, as otherwise the runtime can’t resolve them.

This change has no effect on running applications – as their destinations are already configured.

The only impact is given on the deployment and configuration of an application, where the described changes need to be considered.

Example:

You have a Web application “weatherapp” and it uses a destination called “weather” that is pointing to a weather web service. The destination is defined as resource of the Web app, i.e. its web.xml contains

<resource-ref>

<res-ref-name>weather</res-ref-name>

<res-type>com.sap.core.connectivity.api.http.HttpDestination</res-type>

</resource-ref>

To set up the application in the cloud, following steps need to be done in the specified order:

  1. Deploy the “weatherapp” application
  2. Configure the “weather” destination
  3. Start the “weatherapp” application

In case you have a scenario that relies on loading destinations dynamically, you should use following approach:

  • Define com.sap.core.connectivity.api.DestinationFactory as (static) resource of the web application.
  • The JNDI lookup of the factory will then work without problems at runtime.
  • At runtime, use the factory to load destinations dynamically. The destinations resolved via the factory are then not resolved as JNDI resource and can be configured also after the application has been started.