X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fcontainer%2FContainer.java;h=a7d19e6c761be637611d08e8edfc26d6ef95dfad;hb=9508b56fcc5b2e9addf93106ac2d6f492c21c070;hp=ab27e7c07f896c35d9f72e4c8cdacaf06760f371;hpb=539c6d91b7a34e32c6669445d00e9275c337530a;p=utils diff --git a/system/general/src/main/java/org/wamblee/system/container/Container.java b/system/general/src/main/java/org/wamblee/system/container/Container.java index ab27e7c0..a7d19e6c 100644 --- a/system/general/src/main/java/org/wamblee/system/container/Container.java +++ b/system/general/src/main/java/org/wamblee/system/container/Container.java @@ -1,25 +1,27 @@ /* - * Copyright 2007 the original author or authors. - * + * Copyright 2005-2010 the original author or authors. + * * 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 - * + * * 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, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.system.container; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import org.wamblee.general.Pair; - import org.wamblee.system.core.AbstractComponent; import org.wamblee.system.core.Component; import org.wamblee.system.core.DefaultScope; @@ -34,17 +36,13 @@ import org.wamblee.system.graph.component.ConnectExternalProvidedProvidedFilter; import org.wamblee.system.graph.component.ConnectRequiredExternallyRequiredEdgeFilter; import org.wamblee.system.graph.component.ConnectRequiredProvidedEdgeFilter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - /** * Container consisting of multiple components. * * @author Erik Brakkee */ public class Container extends AbstractComponent { - private static final Log LOG = LogFactory.getLog(Container.class); + private static final Logger LOG = Logger.getLogger(Container.class.getName()); private List components; @@ -369,7 +367,7 @@ public class Container extends AbstractComponent { } catch (SystemAssemblyException e) { throw e; } catch (RuntimeException e) { - LOG.error(getQualifiedName() + ": could not start '" + + LOG.log(Level.WARNING, getQualifiedName() + ": could not start '" + component.getQualifiedName() + "'", e); stopAlreadyStartedComponents(started, aScope); throw e; @@ -408,8 +406,8 @@ public class Container extends AbstractComponent { Component component = aStarted.get(i); aStarted.get(i).stop(aScope.getRuntime(component)); } catch (Throwable t) { - LOG.error(getQualifiedName() + ": error stopping " + - aStarted.get(i).getQualifiedName()); + LOG.log(Level.WARNING, getQualifiedName() + ": error stopping " + + aStarted.get(i).getQualifiedName(), t); } } }