From f8ac1d82b627f2048ba8a21646b9d903004f1504 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Fri, 6 May 2011 15:55:23 +0000 Subject: [PATCH] Improve initialization of Jackrabbit container NEW - bug 31: Add Swing based map viewer in RCP https://bugzilla.argeo.org/show_bug.cgi?id=31 git-svn-id: https://svn.argeo.org/commons/trunk@4519 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../argeo/jackrabbit/JackrabbitContainer.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/JackrabbitContainer.java b/server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/JackrabbitContainer.java index 3dab19312..294fdd5a3 100644 --- a/server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/JackrabbitContainer.java +++ b/server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/JackrabbitContainer.java @@ -95,10 +95,11 @@ public class JackrabbitContainer implements InitializingBean, DisposableBean, /** @deprecated explicitly declare {@link #init()} as init-method instead. */ public void afterPropertiesSet() throws Exception { - log.warn("## This initialization approach is deprecated and will be removed," - + " declare init-method=\"init\" instead."); - if (!alreadyInitialized) + if (!alreadyInitialized) { + log.warn("## If not already done," + + " declare init-method=\"init\"."); initImpl(); + } } public void init() throws Exception { @@ -165,10 +166,11 @@ public class JackrabbitContainer implements InitializingBean, DisposableBean, * instead. */ public void destroy() throws Exception { - log.warn("## This dispose approach is deprecated and will be removed," - + " declare destroy-method=\"dispose\" instead."); - if (!alreadyDisposed) + if (!alreadyDisposed) { + log.warn("## If not already done," + + " declare destroy-method=\"dispose\"."); disposeImpl(); + } } public void dispose() throws Exception { @@ -233,17 +235,17 @@ public class JackrabbitContainer implements InitializingBean, DisposableBean, * will be thrown. */ protected void importNodeTypeDefinitions(final Repository repository) { - final Credentials credentialsToUse; - if (systemExecutor == null) { - if (adminCredentials == null) { - log.error("No system executor or admin credentials found," - + " cannot import node types"); - return; - } - credentialsToUse = adminCredentials; - } else { - credentialsToUse = null; - } + final Credentials credentialsToUse = null; + // if (systemExecutor == null) { + // if (adminCredentials == null) { + // log.error("No system executor or admin credentials found," + // + " cannot import node types"); + // return; + // } + // credentialsToUse = adminCredentials; + // } else { + // credentialsToUse = null; + // } Runnable action = new Runnable() { public void run() { -- 2.30.2