> - Can this be achieved with both the Standalone JR version and the WAR > version? > - Is it mandatory for concurrent access to get the repository object through > a servlet? >
Not at all. It's just that the standalone server uses the ServletContext ( the container for the servlets ) as the sharing space for a repository. This is helpful if your use cases all need some sort of http environment, but otherwise you could do something similar for a nonServlet environment of your choice. The org.apache.jackrabbit.j2ee.RepositoryStartupServlet servlet handles the initialization and sharing of the repository. This servlet actually does ZERO servicing of requests; it just leverages the init stage of the servlet life cycle to control set up of the repo. Note, there's also an RMI servlet in there. I'm not sure that it really uses the servlet's service interface to support the RMI exposure. So, perhaps you could do a similar servlet to expose the repo via some other nonHttp exposure.
