I want to store some objects in JNDI during startup of the container. These objects needs to live in the context of the web application. I can't share them among different web applications.
How can I do this with jBoss?
I guess that an MBean lives in the context of the container and will be shared among all web applications.
The only web app context I know is the servlet context, but this is not (should not) visible in an EJB. Does there exist another context to share objects? JNDI is container wide, isn't it?
I have to clarify some points. I mean j2ee application with web application. So, the shared objects should be accessable only from inside the ear.
I just noticed that sharing objects with JNDI won't work because objects have to be serializable. I should have the possiblity to store any java object.