0

I am migrating my application from standard war to virgo-osgi modularity bundles. Before we used tomcat application server with war deployed. We load all properties file from tomcat lib folder as class path loading. Can i use same way in virgo environment? I found in virgo using different namespace(http://www.springframework.org/schema/osgi-compendium) for load properties file as configuration. I do not want to use that way for now. I prefer same as class path loading. Please help me how to use in virgo.

Thank you, regards, gopy

user1926519
  • 51
  • 1
  • 1
  • 4

1 Answers1

0

Considering that in OSGi each bundle has its own classpath, nothing would prevent you from putting your property files in the same bundle (or any other type of resource for the matter, including even non-OSGi-fied JARs), and reading it like you would usually do in a single-classpath environment.

Having said that, reading your properties through the Compendium Services benefits you with the same modularity benefits that porting your WAR had, as the property file(s) would be considered a separate bundle (of artifact type configuration, in Eclipse Virgo terms) that you can modify in runtime and refresh independently for the changes to take effect according to your design.

Hesham Saleh
  • 439
  • 1
  • 4
  • 11
  • Hi Hesham, thank you for the reply, Yes for bundle i am using compendium services to load properties but i deployed 4 more traditional war files which is using common properties files. before i copied common properties file in tomcat lib folder which is treated as common classpath to all war files. i do not want to put properties file inside each war file. – user1926519 May 17 '15 at 04:53