java - Is it ok to have static final map in stateless ejb to save sate? -


stateless ejb's should not have non-final static fields used save state because not work in distributed apps more 1 jvm. if have static final map in ejb save few parameters our distributed applications state ok , updates on map visible applications running on separate jvms?

the whole point behind stateless ejbs cheap because don't need replicated in distributed environment.

therefore state changes in static final map not replicated.

you better off using distributed cache such ehcache, infinispan or memcache purpose.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -