Thursday, March 5, 2009

Log4j/Struts Behaviour in OSGi

Log4j/Struts behaves weird if the these jar are put under repository, because this single static instance inside these jars are shared by all other bundles.

Example: Struts(struts properties),log4j(log4/properties)

All the properties are written into static members.Since the single instance is shared by both the bundles applications, the value of static references will be overridden and both the application will use the same settings.

This case is not specific to spring Dm , it will also occur when common configuration object
is put under common lib in tomcat.

Example: log4j/struts jar in tomcat common lib

No comments:

 
Free Domain Names @ .co.nr!