How make an object that's shared across the entire application in play framework (1.x)?

别来无恙 提交于 2019-12-24 05:47:13

问题


I want to make one instance of an object across the entire Play Application. I don't think static will work because Play uses many classloaders to load the same class many times (I confirmed this with a heap analysis).

Is there something like InitialContext resources to store and retrieve an object instance across the entire app?

来源:https://stackoverflow.com/questions/37909439/how-make-an-object-thats-shared-across-the-entire-application-in-play-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!