commit d8a13c97cacf1ac2a0ece8038f2a721fd6fde9f2
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Sun Dec 19 00:53:57 2021 +0100

    cleanup

diff --git a/src/main/java/eu/etaxonomy/cdm/server/Bootloader.java b/src/main/java/eu/etaxonomy/cdm/server/Bootloader.java
index df9c186..8f5b2c1 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/Bootloader.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/Bootloader.java
@@ -6,7 +6,6 @@
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
-
 package eu.etaxonomy.cdm.server;
 
 import static eu.etaxonomy.cdm.server.AssumedMemoryRequirements.KB;
@@ -75,7 +74,6 @@ import eu.etaxonomy.cdm.server.instance.Status;
 import eu.etaxonomy.cdm.server.logging.LoggingConfigurator;
 import eu.etaxonomy.cdm.server.win32service.Win32Service;
 
-
 /**
  * A bootstrap class for starting Jetty Runner using an embedded war.
  *
@@ -158,14 +156,6 @@ public final class Bootloader {
 
     /* end of singleton implementation */
 
-
-    /**
-     * @param input
-     * @param output
-     * @param bufferSize
-     * @return
-     * @throws IOException
-     */
     public int writeStreamTo(final InputStream input, final OutputStream output, int bufferSize) throws IOException {
         int available = Math.min(input.available(), 256 * KB);
         byte[] buffer = new byte[Math.max(bufferSize, available)];
@@ -179,8 +169,6 @@ public final class Bootloader {
         return answer;
     }
 
-
-
     public void parseCommandOptions(String[] args) throws ParseException {
         CommandLineParser parser = new GnuParser();
 
@@ -195,7 +183,6 @@ public final class Bootloader {
          }
     }
 
-
     /**
      * Finds the named war file either in the resources known to the class loader
      * or in a target folder if the bootloader is started from within a maven project.
@@ -311,11 +298,7 @@ public final class Bootloader {
     public String getCdmlibServicesLastModified() {
         return cdmlibServicesLastModified;
     }
-    /**
-     * @param extractWar
-     * @return
-     * @throws IOException
-     */
+
     private File unzip(File extractWar) throws IOException {
         UnzipUtility unzip = new UnzipUtility();
 
@@ -325,8 +308,6 @@ public final class Bootloader {
         return destDirectory;
     }
 
-
-
     /**
      * MAIN METHOD
      *
@@ -336,14 +317,10 @@ public final class Bootloader {
     public static void main(String[] args) throws Exception {
 
         Bootloader bootloader = Bootloader.getBootloader();
-
         bootloader.parseCommandOptions(args);
-
         bootloader.startServer();
     }
 
-
-
     public void startServer() throws IOException,
             FileNotFoundException, Exception, InterruptedException {
 
diff --git a/src/main/java/eu/etaxonomy/cdm/server/CommandOptions.java b/src/main/java/eu/etaxonomy/cdm/server/CommandOptions.java
index eb433b4..7e30d07 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/CommandOptions.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/CommandOptions.java
@@ -6,7 +6,6 @@
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
-
 package eu.etaxonomy.cdm.server;
 
 import org.apache.commons.cli.Option;
diff --git a/src/main/java/eu/etaxonomy/cdm/server/JvmManager.java b/src/main/java/eu/etaxonomy/cdm/server/JvmManager.java
index eb1496f..b6ea86e 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/JvmManager.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/JvmManager.java
@@ -22,11 +22,11 @@ import org.apache.log4j.Logger;
  */
 public class JvmManager {
 
+    public static final Logger logger = Logger.getLogger(JvmManager.class);
+
     // Java > 8
     private static final String SUFFIX_META = "Metaspace";
 
-    public static final Logger logger = Logger.getLogger(JvmManager.class);
-
     public static MemoryUsage getMetaSpaceUsage(){
         return getMemoryPoolUsage(SUFFIX_META);
     }
@@ -49,13 +49,13 @@ public class JvmManager {
 
     public static MemoryUsage getHeapMemoryUsage(){
 
-            MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
-            if(memoryMXBean != null){
-                logger.debug("NonHeapMemoryUsage: "+memoryMXBean.getHeapMemoryUsage());
-                return memoryMXBean.getHeapMemoryUsage();
-            }
-            return null;
+        MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
+        if(memoryMXBean != null){
+            logger.debug("NonHeapMemoryUsage: "+memoryMXBean.getHeapMemoryUsage());
+            return memoryMXBean.getHeapMemoryUsage();
         }
+        return null;
+    }
 
     /**
      *
diff --git a/src/main/java/eu/etaxonomy/cdm/server/OsChecker.java b/src/main/java/eu/etaxonomy/cdm/server/OsChecker.java
index bee144f..f237a81 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/OsChecker.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/OsChecker.java
@@ -11,7 +11,6 @@ package eu.etaxonomy.cdm.server;
 /**
  * @author andreas
  * @date Jul 17, 2012
- *
  */
 public class OsChecker {
 
@@ -35,8 +34,9 @@ public class OsChecker {
     }
 
     public boolean isLinux() {
-        if (isMac())
+        if (isMac()) {
             return false;
+        }
         try {
             Runtime.getRuntime().exec(new String[] { "sh", "-c", "ls" }).waitFor();
             return true;
diff --git a/src/main/java/eu/etaxonomy/cdm/server/UnzipUtility.java b/src/main/java/eu/etaxonomy/cdm/server/UnzipUtility.java
index b32e663..056cbd8 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/UnzipUtility.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/UnzipUtility.java
@@ -23,11 +23,9 @@ import org.apache.log4j.Logger;
  * This utility extracts files and directories of a standard zip file to
  * a destination directory.
  * @author www.codejava.net
- *
  */
 public class UnzipUtility {
 
-
     private static final Logger logger = Logger.getLogger(UnzipUtility.class);
 
     /**
diff --git a/src/main/java/eu/etaxonomy/cdm/server/instance/CdmInstance.java b/src/main/java/eu/etaxonomy/cdm/server/instance/CdmInstance.java
index 8e0ebee..e2b70d4 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/instance/CdmInstance.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/instance/CdmInstance.java
@@ -1,3 +1,11 @@
+/**
+ * Copyright (C) 2009 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 package eu.etaxonomy.cdm.server.instance;
 
 import java.lang.reflect.InvocationTargetException;
@@ -19,7 +27,6 @@ import org.eclipse.jetty.webapp.WebAppContext;
 
 import com.mchange.v2.c3p0.DataSources;
 
-
 public class CdmInstance implements Listener {
 
     private static final Logger logger = Logger.getLogger(CdmInstance.class);
@@ -39,7 +46,7 @@ public class CdmInstance implements Listener {
 
     public List<String> getProblems() {
         if (problems == null) {
-            problems = new ArrayList<String>();
+            problems = new ArrayList<>();
         }
         return problems;
     }
@@ -52,17 +59,9 @@ public class CdmInstance implements Listener {
         return status.equals(Status.error);
     }
 
-    /**
-     * @param status
-     *            the status to set
-     */
     public void setStatus(Status status) {
         this.status = status;
     }
-
-    /**
-     * @return the status
-     */
     public Status getStatus() {
         return status;
     }
@@ -80,10 +79,6 @@ public class CdmInstance implements Listener {
     public Configuration getConfiguration() {
         return configuration;
     }
-
-    /**
-     * @return the configuration
-     */
     public void setConfiguration(Configuration configuration) {
         this.configuration = configuration;
     }
@@ -94,10 +89,6 @@ public class CdmInstance implements Listener {
     public WebAppContext getWebAppContext() {
         return webAppContext;
     }
-
-    /**
-     * @return the webAppContext
-     */
     public void setWebAppContext(WebAppContext webAppContext) {
         this.webAppContext = webAppContext;
     }
@@ -140,7 +131,6 @@ public class CdmInstance implements Listener {
             // never override Status.removed !!!
             setStatus(Status.stopped);
         }
-
     }
 
     @Override
@@ -199,12 +189,12 @@ public class CdmInstance implements Listener {
 
     public boolean bindJndiDataSource() {
         try {
-            Class<DataSource> dsCass = (Class<DataSource>) Thread.currentThread().getContextClassLoader().loadClass("com.mchange.v2.c3p0.ComboPooledDataSource");
-            DataSource datasource = dsCass.newInstance();
-            dsCass.getMethod("setDriverClass", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getDriverClass()});
-            dsCass.getMethod("setJdbcUrl", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getDataSourceUrl()});
-            dsCass.getMethod("setUser", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getUsername()});
-            dsCass.getMethod("setPassword", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getPassword()});
+            Class<DataSource> datasourceClass = (Class<DataSource>) Thread.currentThread().getContextClassLoader().loadClass("com.mchange.v2.c3p0.ComboPooledDataSource");
+            DataSource datasource = datasourceClass.newInstance();
+            datasourceClass.getMethod("setDriverClass", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getDriverClass()});
+            datasourceClass.getMethod("setJdbcUrl", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getDataSourceUrl()});
+            datasourceClass.getMethod("setUser", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getUsername()});
+            datasourceClass.getMethod("setPassword", new Class[] {String.class}).invoke(datasource, new Object[] {configuration.getPassword()});
 
             Connection connection = null;
             String sqlerror = null;
@@ -212,7 +202,7 @@ public class CdmInstance implements Listener {
                 connection = datasource.getConnection();
                 connection.close();
             } catch (SQLException e) {
-                sqlerror = "Can not establish connection to data base " + configuration.getDataSourceUrl() + " [sql error code: "+ e.getSQLState() + "]";
+                sqlerror = "Can not establish connection to database " + configuration.getDataSourceUrl() + " [sql error code: "+ e.getSQLState() + "]";
                 getProblems().add(sqlerror);
                 setStatus(Status.error);
                 if(connection !=  null){
diff --git a/src/main/java/eu/etaxonomy/cdm/server/instance/Configuration.java b/src/main/java/eu/etaxonomy/cdm/server/instance/Configuration.java
index 511f051..9a7c34e 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/instance/Configuration.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/instance/Configuration.java
@@ -6,7 +6,6 @@
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
-
 package eu.etaxonomy.cdm.server.instance;
 
 import org.apache.log4j.Logger;
@@ -14,11 +13,10 @@ import org.apache.log4j.Logger;
 /**
  * @author a.kohlbecker
  * @date May 10, 2013
- *
  */
 public class Configuration {
 
-	public static final Logger logger = Logger.getLogger(Configuration.class);
+	private static final Logger logger = Logger.getLogger(Configuration.class);
 
 	private String instanceName;
 	private String password;
@@ -41,7 +39,6 @@ public class Configuration {
 	public String getPassword() {
 		return password;
 	}
-
 	public void setPassword(String password) {
 		this.password = password;
 	}
@@ -49,7 +46,6 @@ public class Configuration {
 	public String getUsername() {
 		return username;
 	}
-
 	public void setUsername(String username) {
 		this.username = username;
 	}
@@ -57,7 +53,6 @@ public class Configuration {
 	public String getDataSourceUrl() {
 		return dataSourceUrl;
 	}
-
 	public void setDataSourceUrl(String url) {
 		this.dataSourceUrl = url;
 	}
@@ -65,7 +60,6 @@ public class Configuration {
 	public String getDriverClass() {
 		return driverClass;
 	}
-
 	public void setDriverClass(String driverClass) {
 		this.driverClass = driverClass;
 	}
diff --git a/src/main/java/eu/etaxonomy/cdm/server/instance/DataSourcePropertyParser.java b/src/main/java/eu/etaxonomy/cdm/server/instance/DataSourcePropertyParser.java
index d3fa4e5..908be3b 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/instance/DataSourcePropertyParser.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/instance/DataSourcePropertyParser.java
@@ -30,7 +30,6 @@ import org.xml.sax.SAXException;
 /**
  * @author a.kohlbecker
  * @date 30.03.2010
- *
  */
 public class DataSourcePropertyParser {
 
@@ -39,8 +38,8 @@ public class DataSourcePropertyParser {
     public static List<Configuration> parseDataSourceConfigs(File datasourcesFile){
 
         logger.info("loading bean definition file: " + datasourcesFile.getAbsolutePath());
-        List<Configuration> configList = new ArrayList<Configuration>();
-        Set<String> idSet = new HashSet<String>();
+        List<Configuration> configList = new ArrayList<>();
+        Set<String> idSet = new HashSet<>();
         try {
             DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
             Document doc = builder.parse(datasourcesFile);
@@ -80,9 +79,7 @@ public class DataSourcePropertyParser {
                 } else {
                     logger.error("instance with name '"+ conf.getInstanceName() + "' alreaddy exists");
                 }
-
             }
-
         } catch (SAXException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
@@ -108,7 +105,4 @@ public class DataSourcePropertyParser {
         }
         return null;
     }
-
-
-
-}
+}
\ No newline at end of file
diff --git a/src/main/java/eu/etaxonomy/cdm/server/instance/InstanceManager.java b/src/main/java/eu/etaxonomy/cdm/server/instance/InstanceManager.java
index 2c36157..508a341 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/instance/InstanceManager.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/instance/InstanceManager.java
@@ -106,7 +106,7 @@ public class InstanceManager implements LifeCycle.Listener {
             // instance.bindJndiDataSource();
             if (!instance.bindJndiDataSource()) {
                 // a problem with the datasource occurred skip this webapp
-                logger.error("a problem with the datasource occurred -> aboarding startup of /" + instance.getName());
+                logger.error("a problem with the datasource occurred -> aborting startup of /" + instance.getName());
                 instance.setStatus(Status.error);
             } else {
                 // ready for startup add to queue
diff --git a/src/main/java/eu/etaxonomy/cdm/server/instance/StartupQueue.java b/src/main/java/eu/etaxonomy/cdm/server/instance/StartupQueue.java
index e3feae1..d2aaae7 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/instance/StartupQueue.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/instance/StartupQueue.java
@@ -30,28 +30,17 @@ public class StartupQueue extends LinkedList<CdmInstance> {
 
     private final Logger logger = Logger.getLogger(InstanceManager.class);
 
-    Set<CdmInstance> instancesStartingUp = new HashSet<CdmInstance>();
+    Set<CdmInstance> instancesStartingUp = new HashSet<>();
 
     private int parallelStartUps = 1;
 
-    /**
-     * @return the parallelStartUps
-     */
     public int getParallelStartUps() {
         return parallelStartUps;
     }
-
-    /**
-     * @param parallelStartUps
-     *            the parallelStartUps to set
-     */
     public void setParallelStartUps(int parallelStartUps) {
         this.parallelStartUps = parallelStartUps;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean add(CdmInstance e) {
         boolean result = super.add(e);
@@ -59,18 +48,12 @@ public class StartupQueue extends LinkedList<CdmInstance> {
         return result;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void addFirst(CdmInstance e) {
         super.addFirst(e);
         registerAt(e);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void addLast(CdmInstance e) {
         super.addLast(e);
@@ -89,9 +72,6 @@ public class StartupQueue extends LinkedList<CdmInstance> {
         startNextInstances();
     }
 
-    /**
-     *
-     */
     private void startNextInstances() {
         logger.debug("startNextInstances()");
         while(instancesStartingUp.size() < parallelStartUps && !isEmpty()) {
@@ -103,9 +83,6 @@ public class StartupQueue extends LinkedList<CdmInstance> {
         }
     }
 
-    /**
-     * @param e
-     */
     @SuppressWarnings("unused")
     private void registerAt(CdmInstance e) {
         new InstanceListener(e);
@@ -122,17 +99,11 @@ public class StartupQueue extends LinkedList<CdmInstance> {
             instance.getWebAppContext().addLifeCycleListener(this);
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public void lifeCycleStarting(LifeCycle event) {
             // IGNORE
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public void lifeCycleStarted(LifeCycle event) {
             notifyInstanceStartedUp(instance);
@@ -142,9 +113,6 @@ public class StartupQueue extends LinkedList<CdmInstance> {
             instance = null;
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public void lifeCycleFailure(LifeCycle event, Throwable cause) {
             notifyInstanceFailed(instance);
@@ -154,22 +122,15 @@ public class StartupQueue extends LinkedList<CdmInstance> {
             instance = null;
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public void lifeCycleStopping(LifeCycle event) {
             // IGNORE
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public void lifeCycleStopped(LifeCycle event) {
             // IGNORE
         }
-
     }
 
     class StartupThread extends Thread{
@@ -213,9 +174,6 @@ public class StartupQueue extends LinkedList<CdmInstance> {
             } finally {
                 MDC.clear();
             }
-
         }
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/main/java/eu/etaxonomy/cdm/server/instance/Status.java b/src/main/java/eu/etaxonomy/cdm/server/instance/Status.java
index 3e4e4b3..a5100b2 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/instance/Status.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/instance/Status.java
@@ -3,6 +3,7 @@ package eu.etaxonomy.cdm.server.instance;
 import org.eclipse.jetty.util.component.LifeCycle;
 
 public enum Status{
+
     /**
      * New instances are uninitialized
      */
diff --git a/src/main/java/eu/etaxonomy/cdm/server/jsvc/ServiceWrapper.java b/src/main/java/eu/etaxonomy/cdm/server/jsvc/ServiceWrapper.java
index e248f9a..81938d5 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/jsvc/ServiceWrapper.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/jsvc/ServiceWrapper.java
@@ -6,14 +6,12 @@
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
-
 package eu.etaxonomy.cdm.server.jsvc;
 
 import eu.etaxonomy.cdm.server.Bootloader;
 
 public class ServiceWrapper {
 
-
     /**
      * Method required by jsvc. jsvc is being used by the linux start up script
      * @param args
@@ -49,6 +47,4 @@ public class ServiceWrapper {
    public void destroy() throws Exception {
        Bootloader.getBootloader().getServer().destroy();
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/main/java/eu/etaxonomy/cdm/server/logging/InstanceLogWrapper.java b/src/main/java/eu/etaxonomy/cdm/server/logging/InstanceLogWrapper.java
index 546c3c2..7301ff0 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/logging/InstanceLogWrapper.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/logging/InstanceLogWrapper.java
@@ -24,7 +24,6 @@ import org.slf4j.MDC;
  */
 public class InstanceLogWrapper extends HandlerWrapper {
 
-
     /**
      * Key under which the instance name stored in the
      * Mapped Diagnostic Context (MDC)
@@ -38,19 +37,17 @@ public class InstanceLogWrapper extends HandlerWrapper {
     }
 
     @Override
-    public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
-    {
+    public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
+                throws IOException, ServletException {
+
         // Collect Info for NDC/MDC
         MDC.put(CDM_INSTANCE, instanceName);
-        try
-        {
+        try {
             super.handle(target, baseRequest, request, response);
         }
-        finally
-        {
+        finally {
             // Pop info out / clear the NDC/MDC
             MDC.clear();
         }
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/main/java/eu/etaxonomy/cdm/server/win32service/CDMServerWrapperListener.java b/src/main/java/eu/etaxonomy/cdm/server/win32service/CDMServerWrapperListener.java
index 3dcf679..554f212 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/win32service/CDMServerWrapperListener.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/win32service/CDMServerWrapperListener.java
@@ -7,7 +7,7 @@
  * ------------------------------------------------------------------------
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at 
+ * You may obtain a copy of the License at
  * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,7 +16,6 @@
  * limitations under the License.
  * ========================================================================
  */
-
 package eu.etaxonomy.cdm.server.win32service;
 
 
@@ -29,38 +28,29 @@ import org.tanukisoftware.wrapper.WrapperManager;
  * @date 26.10.2010
  *
  */
-public class CDMServerWrapperListener implements WrapperListener
-{
+public class CDMServerWrapperListener implements WrapperListener {
+
+    private static final Logger logger = Logger.getLogger(CDMServerWrapperListener.class);
+
     private static Server __server = null;
-    
-    public static final Logger logger = Logger.getLogger(CDMServerWrapperListener.class);
 
-    public CDMServerWrapperListener()
-    {
+    public CDMServerWrapperListener(){
     }
 
-    /* (non-Javadoc)
-     * @see org.tanukisoftware.wrapper.WrapperListener#controlEvent(int)
-     */
-    public void controlEvent(int event)
-    {
-        if (!WrapperManager.isControlledByNativeWrapper())
-        {
-            if ((event == WrapperManager.WRAPPER_CTRL_C_EVENT) || (event == WrapperManager.WRAPPER_CTRL_CLOSE_EVENT) || (event == WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT))
-            {
+    @Override
+    public void controlEvent(int event) {
+        if (!WrapperManager.isControlledByNativeWrapper()) {
+            if ((event == WrapperManager.WRAPPER_CTRL_C_EVENT)
+                    || (event == WrapperManager.WRAPPER_CTRL_CLOSE_EVENT)
+                    || (event == WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT)){
                 WrapperManager.stop(0);
             }
         }
-
     }
 
-    /* (non-Javadoc)
-     * @see org.tanukisoftware.wrapper.WrapperListener#start(java.lang.String[])
-     */
-    public Integer start(String[] args)
-    {
-        for(int i=0; i<args.length; i++)
-        {
+    @Override
+    public Integer start(String[] args) {
+        for(int i=0; i<args.length; i++) {
         	logger.info("ARG[" + i + "] = " + args[i]);
         }
         try {
@@ -72,51 +62,34 @@ public class CDMServerWrapperListener implements WrapperListener
         return null;
     }
 
-    /* (non-Javadoc)
-     * @see org.tanukisoftware.wrapper.WrapperListener#stop(int)
-     */
-    public int stop(int code)
-    {
-        try
-        {
+    @Override
+    public int stop(int code) {
+        try {
         	logger.info("Stopping CDM Server!!!");
             __server.stop();
             logger.info("CDM Server Stopped!!!");
             return code;
         }
-        catch (Exception e)
-        {
+        catch (Exception e) {
         	logger.error("Stop Server Error", e);
             return -1;
         }
-
     }
 
-    /**
-     * @param server
-     */
-    public static void setServer(Server server)
-    {
+    public static void setServer(Server server) {
         __server = server;
     }
 
-    /**
-     * @return
-     */
-    public static Server getServer()
-    {
+    public static Server getServer() {
         return __server;
     }
 
-    public static void main(String[] args)
-    {
+    public static void main(String[] args) {
         String newStrArgs[] = new String[args.length + 1];
         newStrArgs[0] = System.getProperty("jetty.home") + "etc/jetty-win32-service.xml";
-        for(int i=0; i<args.length; i++)
-        {
+        for(int i=0; i<args.length; i++) {
             newStrArgs[i+1] = args[i];
         }
         WrapperManager.start(new CDMServerWrapperListener(), newStrArgs);
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/main/java/eu/etaxonomy/cdm/server/win32service/Win32Service.java b/src/main/java/eu/etaxonomy/cdm/server/win32service/Win32Service.java
index a1665a8..41e77f0 100644
--- a/src/main/java/eu/etaxonomy/cdm/server/win32service/Win32Service.java
+++ b/src/main/java/eu/etaxonomy/cdm/server/win32service/Win32Service.java
@@ -7,7 +7,7 @@
  * ------------------------------------------------------------------------
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at 
+ * You may obtain a copy of the License at
  * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,71 +16,55 @@
  * limitations under the License.
  * ========================================================================
  */
-
 package eu.etaxonomy.cdm.server.win32service;
 
 import org.apache.log4j.Logger;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.util.component.AbstractLifeCycle;
 
-
 /**
  * @author a.kohlbecker
  * @date 26.10.2010
- *
  */
-public class Win32Service extends AbstractLifeCycle implements Runnable
-{
-	public static final Logger logger = Logger.getLogger(Win32Service.class);
-	
+public class Win32Service extends AbstractLifeCycle implements Runnable {
+
+	private static final Logger logger = Logger.getLogger(Win32Service.class);
+
     private Server server;
-    
-    public void doStart()
-    {
+
+    @Override
+    public void doStart() {
     	logger.info("doStart");
         CDMServerWrapperListener.setServer(server);
     }
-    
-    public void doStop()
-    {
-    	logger.info("Listener is stopping CDM Server Instance!!!"); 
+
+    @Override
+    public void doStop() {
+    	logger.info("Listener is stopping CDM Server Instance!!!");
     }
-    
-    public void run()
-    {
+
+    @Override
+    public void run() {
         doStop();
-        
+
     }
 
-    public void stopServer()
-    {
-        try
-        {
+    public void stopServer() {
+        try {
         	logger.info("Thread Test Stopper!!!");
             server.stop();
             //WrapperManager.stop(0);
         }
-        catch (Exception e)
-        {
+        catch (Exception e) {
             e.printStackTrace();
         }
     }
-    
-    
-    public Server getServer()
-    {
+
+    public Server getServer() {
         return server;
     }
 
-    public void setServer(Server server)
-    {
+    public void setServer(Server server) {
         this.server = server;
     }
-    
-   
-
-   
-    
-    
-    
-}
+}
\ No newline at end of file
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
index c952080..8f547fb 100644
--- a/src/main/resources/logback.xml
+++ b/src/main/resources/logback.xml
@@ -50,7 +50,7 @@ by which custom configuration files can be specified for production and test env
   
   <!-- ~~~~~~ "disabling" loggers unwanted at INFO level ~~~~~~ -->
   <!-- avoid vast amount of "getCitation not yet implemented" & "getProblems not yet implemented" messages -->
-  <logger name="eu.etaxonomy.cdm.model.name.TaxonNameBase" level="ERROR" />
+  <logger name="eu.etaxonomy.cdm.model.name.TaxonName" level="ERROR" />
   <logger name="eu.etaxonomy.cdm.persistence.dao.initializer" level="ERROR" />
   <logger name="eu.etaxonomy.cdm.cache.CdmTransientEntityCacher" level="WARN" />
   <logger name="eu.etaxonomy.cdm.remote.controller.interceptor" level="WARN" />
