Architecture of a Java EE project -


i have java ee project ear , 4 wars. have pojos used in wars. classes contain static variables , methods , should same across wars. should placed?

some background: had inherited project used pojos in 1 of wars. wanted 4 of wars refer same instance of new staticly accessed classes. not possible them held in 1 of wars, each war appeared take it's own runtime instance of static classes, , changing class in 1 war, did not result in change class in war.

so combat installed in jar , deployed server. every time project deployed jar must built , installed on server if has changed.

the person deploys here doesn't architecture , wondered if there way it?

yes, war files each loaded under own classloader, not see each other's classes.

you can place jar file in root of ear , refer in manifest of each each war.these jars called "utility jars".

i agree self-contained deployment of kind preferable having separate jar file somewhere else.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -