Singleton vs JNDI vs ?
Hey guys,
A question. In designing our application we needed a place to store a few arrays that never change, some setting that never change and some other stuff.
I'd initially thought of using a singleton for this purpose. This however messes up my plan of using one jar-file for several webapps running in the same VM. Once the first webapp would load, the singleton would be loaded and all webapps would be using one and the same instance.
So, I thought of using JNDI to store an instance of this object per webapp. Problem here is, it's so much of a hassle to get something from JNDI. You need to bind it there, catch exceptions when retrieving etc.etc.etc.
What are your thoughts on this topic?

