Ok, the complete crazy hack idea:
Deploy PropertyPlayHolderConfigurer (or use Tomcat's web.xml) for each application instance and load properties with the same name as System.properties ().
Then create a delegate property class that contains both sets of properties. Then
Properties props = new DelegatingProperties(app1Props,app2Props) System.setProperties(delegate); public class DelegatingProperties extends Properties { private Properties app1Props; private Properties app2Props; public DelegatingProperties(Properties app1Props, Properties app2Props) { this.app1Props = app1Props; this.app2Props = app2Props; } public String getProperty(String prop) {
These are the SYSTEM properties that we are talking about, and they are intended for use in the system. Your library was probably developed when it was 1-app-1-jvm (or the developer is also a smell).
Can I get a props for creativity? :)
source share