]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/JackrabbitContainer.java
Add dep folder
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jackrabbit / src / main / java / org / argeo / jackrabbit / JackrabbitContainer.java
index b501f624147aed26b0173d6fe33ed5965fec62ae..9060b585a59bee58a8615b910a11cdfd9934e5cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,6 +41,7 @@ import org.apache.jackrabbit.core.config.RepositoryConfigurationParser;
 import org.argeo.ArgeoException;
 import org.argeo.jcr.ArgeoNames;
 import org.argeo.jcr.JcrUtils;
+import org.argeo.jcr.MaintainedRepository;
 import org.springframework.core.io.Resource;
 import org.springframework.util.SystemPropertyUtils;
 import org.xml.sax.InputSource;
@@ -49,8 +50,9 @@ import org.xml.sax.InputSource;
  * Wrapper around a Jackrabbit repository which allows to configure it in Spring
  * and expose it as a {@link Repository}.
  */
-public class JackrabbitContainer extends JackrabbitWrapper {
-       private Log log = LogFactory.getLog(JackrabbitContainer.class);
+public class JackrabbitContainer extends JackrabbitWrapper implements
+               MaintainedRepository {
+       private final static Log log = LogFactory.getLog(JackrabbitContainer.class);
 
        // local
        private Resource configuration;
@@ -239,6 +241,11 @@ public class JackrabbitContainer extends JackrabbitWrapper {
                repository = null;
        }
 
+       public void dispose() {
+               throw new IllegalArgumentException(
+                               "Call destroy() method instead of dispose()");
+       }
+
        /*
         * UTILITIES
         */