Dear Spring Community
In one of our current projects, we have the customer requirement, that JNDI resources cannot be accessed anonymously, but only within a servlet that is authenticated against a user defined in the deployment descriptor. As we need to access various JNDI resources during ApplicationContext init, and the ContextLoaderListener (in fact any listener) is not run as a configurable user, we would need to go back to "Spring 2 Style", initializing the ApplicationContext within a Servlet instead of a listener.
What I would like to know now is if there is a common way to do that in Spring 3. I know the ServletContextLoader was deprecated and I think removed from Spring 3. I would like to write as few lines as code as possible. Probably there is a ready-made class I do not know about, that still does the job of initializing the AC within a servlet, without programmatically doing it myself. Of course I would like to keep the contextConfigLocation context-param intact.
Ideally, this particular customer would only receive a different web.xml and nothing more.
Thank you in advance
~ Nils


Reply With Quote
