I have a Java EE project with an EAR and 4 WARs. I have some pojos that are used in the wars. They are classes which contain static variables and methods and should be the same across the WARs. Where should they be placed?
Some background: I had inherited the project with the frequently used pojos in one of the wars. However I wanted all 4 of the WARs to refer to the same instance of some new staticly accessed classes. This was not possible with them held in one of the wars, as each WAR appeared to take it's own runtime instance of the static classes, and changing the class in one WAR, did not result in a change to the class in another WAR.
So to combat this I installed in a JAR and deployed that to the server. But now every time the project is deployed the JAR must also be built and installed on the server too if it has changed.
The person who deploys that here doesn't like this architecture and I wondered if there was another way to do it?