Search code examples
javaspringosgiapache-servicemix

Spring Beans Profiles and OSGI


I've faced an issue during developing spring and OSGi based application. In my application I would like to use Spring beans profiles, however I don't know how to force use specific profile. I've used one time, spring profiles but in web application and I followed this tutorial: http://java.dzone.com/articles/spring-31-environment-profiles.

But I don't know how to do this in OSGi environment, because I couldn't find some equivalent of ApplicationContextInitializer


Solution

  • I am not sure if spring-dm supports that, as its based on older Spring. Spring profiles was added to Spring 3.1, which was created long after spring-dm was a dead project. http://www.springsource.org/osgi