diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/CommandQueueLister.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/CommandQueueLister.java index 2a0c14a5970b742f5e7aa00aceafbb6698479abd..843b4c150c11e3ad80864bdd6c2eddef1331d28d 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/CommandQueueLister.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/CommandQueueLister.java @@ -16,7 +16,6 @@ package ch.systemsx.cisd.openbis.dss.generic.server; - /** * A class that provides a lister for the commands in the command queue of the store. * @@ -32,6 +31,7 @@ public final class CommandQueueLister public static void listQueuedCommand() { final ConfigParameters configParams = DataStoreServer.getConfigParameters(); - DataSetCommandExecutor.listQueuedCommands(configParams.getStorePath()); + DataSetCommandExecutor.listQueuedCommands(configParams.getCommandQueueDir()); } + } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ConfigParameters.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ConfigParameters.java index ae4087b6b4d6a2349cc78204a88a832a8a22ba99..c5c0ce9d5ba0a9475461fcd35ec073c655de85e4 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ConfigParameters.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ConfigParameters.java @@ -65,6 +65,8 @@ public final class ConfigParameters implements IServletPropertiesManager static final String AUTH_CACHE_EXPIRATION_TIME = "authorization-cache-expiration-time"; + static final String COMMAND_QUEUE_DIR = "commandqueue-dir"; + static final int DEFAULT_AUTH_CACHE_EXPIRATION_TIME_MINS = 5; static final String AUTH_CACHE_CLEANUP_TIMER_PERIOD = @@ -130,6 +132,8 @@ public final class ConfigParameters implements IServletPropertiesManager private final String webstartJarPath; + private final File commandQueueDir; + /** * Creates an instance based on the specified properties. * @@ -138,7 +142,9 @@ public final class ConfigParameters implements IServletPropertiesManager ConfigParameters(final Properties properties) { this.properties = properties; - storePath = new File(PropertyUtils.getMandatoryProperty(properties, STOREROOT_DIR_KEY)); + final String storeRootDir = + PropertyUtils.getMandatoryProperty(properties, STOREROOT_DIR_KEY); + storePath = new File(storeRootDir); dssInternalTempDir = getInternalTempDirectory(properties); rpcIncomingDirectory = getRpcIncomingDirectory(properties); port = getMandatoryIntegerProperty(properties, PORT_KEY); @@ -146,6 +152,8 @@ public final class ConfigParameters implements IServletPropertiesManager downloadURL = PropertyUtils.getMandatoryProperty(properties, DOWNLOAD_URL); sessionTimeout = getMandatoryIntegerProperty(properties, SESSION_TIMEOUT_KEY) * 60; useSSL = PropertyUtils.getBoolean(properties, USE_SSL, true); + commandQueueDir = + new File(PropertyUtils.getProperty(properties, COMMAND_QUEUE_DIR, storeRootDir)); if (useSSL == true) { keystorePath = PropertyUtils.getMandatoryProperty(properties, KEYSTORE_PATH_KEY); @@ -237,6 +245,11 @@ public final class ConfigParameters implements IServletPropertiesManager return storePath; } + public File getCommandQueueDir() + { + return commandQueueDir; + } + public final File getRpcIncomingDirectory() { return rpcIncomingDirectory; diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataSetCommandExecutor.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataSetCommandExecutor.java index d0bdcaaf930a69c1e68dd2a7ab2edbc6421b5ed6..975974e66bcbf6adef4e8eb8d69cf26487c1201f 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataSetCommandExecutor.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataSetCommandExecutor.java @@ -203,7 +203,15 @@ class DataSetCommandExecutor implements IDataSetCommandExecutor System.out.println("Found " + commandQueue.size() + " items in command queue:"); for (final IDataSetCommand cmd : commandQueue) { - System.out.println(cmd.getDescription()); + try + { + System.out.println(cmd.getDescription()); + } catch (RuntimeException ex) + { + System.err.printf("Error showing description of command '%s':\n", cmd + .getClass().getSimpleName()); + ex.printStackTrace(); + } } } }