What are possibilities to build an singleton object providing resources like configuration parameters to EJB objects in J2EE environment?
I don't want to access dB or LDAP every time when I need those resources. My first tought was to use Singleton pattern and build FactoryObject using static variables and methods. I've heard that using statics is against EJB specifications.
Is there some best practise for handing this?
You can try using JMX MBeans if you need to change the parameters at runtime, otherwise (if they don't change) you can use env-entries and a stateless session bean..