springtomcatcloud-foundryibm-wasxml-configuration

Existing Spring Application to Cloud Foundry


We are planning to move a Spring based application to Cloud Foundry. The application currently uses WAS server and access data sources using JNDI lookup. We are using spring features like MVC, AOP etc. I have certain questions in mind :

  1. Is it possible to switch to Tomcat and configure dataSources using Spring-cloud-connectors and possible conflicts we might run into ?
  2. Currently , datasources are configured in XML files, Should I use the same XML files or switch to annotations.

Can anyone please provide some clarity over this and other known issues with this approach?


Solution

  • Spring Cloud Connectors are by far the easiest way to bind to data sources in Cloud Foundry. I would recommend converting your JNDI lookups to use these service connections as described here:

    http://docs.cloudfoundry.org/buildpacks/java/spring-service-bindings.html