Improve SLC client
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 14 Oct 2012 15:24:40 +0000 (15:24 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 14 Oct 2012 15:24:40 +0000 (15:24 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@5604 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

dist/slc/src/main/rpm/etc/slc-cl/config.ini
dist/slc/src/main/rpm/etc/slc-cl/log4j.properties
dist/slc/src/main/rpm/usr/bin/slc
runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/BundlesManager.java
runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/OsgiExecutionModulesManager.java

index 6d3358faf2b6731e66b997511bad6ef012e41b6c..37bd5af3127f57b412694a391438dc236272a791 100644 (file)
@@ -3,7 +3,6 @@ org.springframework.osgi.extender,\
 org.argeo.node.repofactory.jackrabbit,\
 org.argeo.node.repo.jackrabbit,\
 org.argeo.security.dao.os,\
-org.argeo.security.equinox,\
 org.argeo.slc.node.jackrabbit,\
 org.argeo.slc.agent,\
 org.argeo.slc.agent.jcr
index a9d97ce917c21b85c45007b9314debe232967444..42b2038451cf61fb1275419387731134e2ab0f28 100644 (file)
@@ -3,16 +3,6 @@ log4j.rootLogger=WARN, console
 
 ## Levels
 log4j.logger.org.argeo=INFO
-#log4j.logger.org.springframework=DEBUG
-#log4j.logger.org.hibernate=DEBUG
-#log4j.logger.org.apache.activemq=DEBUG
-
-log4j.logger.org.springframework.web.servlet.PageNotFound=ERROR
-log4j.logger.org.apache.directory.server.core.schema.SchemaService=ERROR
-log4j.logger.org.springframework.security.SpringSecurityMessageSource=ERROR
-
-log4j.logger.org.apache.directory.server.core.partition=ERROR
-log4j.logger.org.apache.directory.server.core.schema.bootstrap.BootstrapAttributeTypeRegistry=ERROR
 
 ## Appenders
 log4j.appender.console=org.apache.log4j.ConsoleAppender
index 3411c9534f56772329e1c28219b8b8fe181d140b..6dd87d33b9284b745ca2a1fb6b2c9cfb10ad55b4 100644 (file)
@@ -16,6 +16,9 @@ then
     cp /etc/slc-cl/config.ini $CONF_DIR
 fi
 
+# WORKAROUND: Clean up workspace directories
+rmdir $DATA_DIR/node/workspaces/*
+
 java \
  -Dslc.launch.module="$MODULE" \
  -Dslc.launch.flow="$FLOW" \
index 7d96ae4c9e6d5487e7dddae839cc4716dae452fe..6be2294a453605d3f8e06861e164c001458c5307 100644 (file)
@@ -316,8 +316,13 @@ public class BundlesManager implements BundleContextAware, FrameworkListener,
         * @param osgiBundle
         *            cannot be null
         * @return the related bundle or null if not found
+        * @throws SlcException
+        *             if osgiBundle argument is null
         */
        public Bundle findRelatedBundle(OsgiBundle osgiBundle) {
+               if (osgiBundle == null)
+                       throw new SlcException("OSGi bundle cannot be null");
+
                Bundle bundle = null;
                if (osgiBundle.getInternalBundleId() != null) {
                        bundle = bundleContext.getBundle(osgiBundle.getInternalBundleId());
index 5a8d3da5437ac728876c78a536c9910dad0c6ab4..3df33cab896f944a05086e71704aebe79cb9cfde 100644 (file)
@@ -100,6 +100,8 @@ public class OsgiExecutionModulesManager extends
                        log.debug("Launch unique flow " + flow + " from module " + module);
                try {
                        OsgiBundle osgiBundle = bundlesManager.findFromPattern(module);
+                       if (osgiBundle == null)
+                               throw new SlcException("No OSGi bundle found for " + module);
                        Bundle moduleBundle = bundlesManager.findRelatedBundle(osgiBundle);
                        bundlesManager.startSynchronous(moduleBundle);
                        RealizedFlow lastLaunch = findRealizedFlow(module, flow);