To reduce database hits, I've used static variables to store data from database.
At time of WAR
deployment this data is stored in these variabes as it is not changing so frequently.
This scenario was working fine as the scope was with only single a WAR
. Now I have another application where I need access to these varibles
But due to different application scope,I'm unable to access them in another application.
Also I'm having an EAR
which encloses both above WAR
and one JAR
containing some common buisness logic of both WAR
s.
So under EAR
is it possible to share these variables via JAR
or using some different approach?
If any javaEE
concept can help in this scenario, then please let me know about it also.
I'm using maven
with Jboss7.1.1.Final
for this