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.
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
To set up the application in the cloud, following steps need to be done in the specified order:
- Deploy the “weatherapp” application
- Configure the “weather” destination
- 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.