X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.server.jcr%2Fsrc%2Forg%2Fargeo%2Fjackrabbit%2FJackrabbitContainer.java;h=c5ca7952c0f6462fa65286985aee39a759fef17a;hb=0d843d64df3f588ad1429905cf5f6e29c65becd3;hp=547db9b0d1ec5ff04a54b653f539807476a98f22;hpb=b4c772a263e0f19f6c283dbbb87d04794072b284;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.server.jcr/src/org/argeo/jackrabbit/JackrabbitContainer.java b/org.argeo.server.jcr/src/org/argeo/jackrabbit/JackrabbitContainer.java index 547db9b0d..c5ca7952c 100644 --- a/org.argeo.server.jcr/src/org/argeo/jackrabbit/JackrabbitContainer.java +++ b/org.argeo.server.jcr/src/org/argeo/jackrabbit/JackrabbitContainer.java @@ -38,7 +38,7 @@ import org.apache.jackrabbit.api.JackrabbitRepository; import org.apache.jackrabbit.core.RepositoryImpl; import org.apache.jackrabbit.core.config.RepositoryConfig; import org.apache.jackrabbit.core.config.RepositoryConfigurationParser; -import org.argeo.ArgeoException; +import org.argeo.jcr.ArgeoJcrException; import org.argeo.jcr.ArgeoNames; import org.argeo.jcr.JcrUtils; import org.springframework.core.io.Resource; @@ -80,7 +80,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { // long begin = System.currentTimeMillis(); if (getRepository() != null) - throw new ArgeoException("Cannot be used to wrap another repository"); + throw new ArgeoJcrException("Cannot be used to wrap another repository"); Repository repository = createJackrabbitRepository(); super.setRepository(repository); @@ -132,7 +132,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { return repository; } catch (Exception e) { - throw new ArgeoException("Cannot create Jackrabbit repository " + getHomeDirectory(), e); + throw new ArgeoJcrException("Cannot create Jackrabbit repository " + getHomeDirectory(), e); } finally { IOUtils.closeQuietly(configurationIn); } @@ -153,7 +153,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { return homeDirectory.getCanonicalFile(); } catch (IOException e) { - throw new ArgeoException("Cannot get canonical file for " + homeDirectory, e); + throw new ArgeoJcrException("Cannot get canonical file for " + homeDirectory, e); } } @@ -175,10 +175,10 @@ public class JackrabbitContainer extends JackrabbitWrapper { restartAndClearCaches = true; } } - } catch (ArgeoException e) { + } catch (ArgeoJcrException e) { throw e; } catch (Exception e) { - throw new ArgeoException("Cannot migrate", e); + throw new ArgeoJcrException("Cannot migrate", e); } finally { JcrUtils.logoutQuietly(session); } @@ -197,7 +197,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { try { session = login(); } catch (RepositoryException e) { - throw new ArgeoException("Cannot login to migrated repository", e); + throw new ArgeoJcrException("Cannot login to migrated repository", e); } for (JackrabbitDataModelMigration dataModelMigration : new TreeSet( @@ -250,7 +250,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { try { return configuration != null ? configuration.getInputStream() : null; } catch (IOException e) { - throw new ArgeoException("Cannot read Jackrabbit configuration " + configuration, e); + throw new ArgeoJcrException("Cannot read Jackrabbit configuration " + configuration, e); } } @@ -264,7 +264,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { try { return variables != null ? variables.getInputStream() : null; } catch (IOException e) { - throw new ArgeoException("Cannot read Jackrabbit variables " + variables, e); + throw new ArgeoJcrException("Cannot read Jackrabbit variables " + variables, e); } } @@ -305,7 +305,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { } } catch (IOException e) { - throw new ArgeoException("Cannot read configuration properties", e); + throw new ArgeoJcrException("Cannot read configuration properties", e); } finally { IOUtils.closeQuietly(propsIn); } @@ -325,7 +325,7 @@ public class JackrabbitContainer extends JackrabbitWrapper { } public void setRepository(Repository repository) { - throw new ArgeoException("Cannot be used to wrap another repository"); + throw new ArgeoJcrException("Cannot be used to wrap another repository"); } public void setDataModelMigrations(Set dataModelMigrations) {