Permalink
Browse files

Removed user-implemented profile support; relying on CloudFoundry's b…

…uilt in one
  • Loading branch information...
1 parent 18bbd6d commit 4814d257755a65f0c3c9f523e165a11f29b27b9d @ramnivas ramnivas committed Oct 11, 2011
@@ -1,21 +0,0 @@
-package org.cloudfoundry.services;
-
-import org.cloudfoundry.runtime.env.CloudEnvironment;
-import org.springframework.context.ApplicationContextInitializer;
-import org.springframework.context.ConfigurableApplicationContext;
-
-public class CloudApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
-
- @Override
- public void initialize(ConfigurableApplicationContext applicationContext) {
- CloudEnvironment env = new CloudEnvironment();
- if (env.getInstanceInfo() != null) {
- System.out.println("cloud API: " + env.getCloudApiUri());
- applicationContext.getEnvironment().setActiveProfiles("cloud");
- }
- else {
- applicationContext.getEnvironment().setActiveProfiles("default");
- }
- }
-
-}
@@ -4,11 +4,6 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
- <param-name>contextInitializerClasses</param-name>
- <param-value>org.cloudfoundry.services.CloudApplicationContextInitializer</param-value>
- </context-param>
-
- <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/root-context.xml</param-value>
</context-param>

0 comments on commit 4814d25

Please sign in to comment.