How do I store application scoped data in the EJB tier? Like using
setAttribute()/getAttribute() in ServletContext ("application" in JSP) in
the web tier.
Using instance attributes in Stateless Session Beans doesn't work, since
there can be several instances, and you never know which one is used. Using
static attributes in an EJB class doesn't work well either, since they may
be shared among several applications running in the same server.
Is it possible to use JNDI for this? Can I just use rebind() and lookup()
with arbitrary objects on the EJB JNDI InitialContext, just like I use
ServletContext?