I have jackrabbit runnig with repo /users/xyz/repo1
Inside this I have repository.xml


I want to call org.apache.jackrabbit.servlet.jackrabbit.StatisticsServlet
to show different metrices.


*But the problem I am facing here is: --> In order to create
RepositoryConfig, I need to pass in the repo folder path, but Jackrabbit
process is already kept it locked. What is the alternative here ?*

*I can copy over "/Users/xyz/repository/", to some other folder and use
that, but my question is in that case will I get all the repository
information ?*

----> Here is my sample code

HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    String klass = RepositoryContext.class.getName();
    String name = getServletConfig().getInitParameter(klass);
    if (name == null) {
      name = klass;
    }

//    RepositoryContext context = (RepositoryContext)
//        getServletContext().getAttribute(name);
    RepositoryConfig config = null;
    try {
      config = RepositoryConfig.create(new File("/Users/xyz/repository/"));
      //**some try
      // **some try ends here
    } catch (ConfigurationException e) {
      e.printStackTrace();
    }
    RepositoryContext context = null;
    try {
      context = RepositoryContext.create(config);

Reply via email to