X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fspring%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fspring%2FSpringComponent.java;h=0e54deaec72ff12b194348704632f9bb8fdf7c4e;hb=b0e1c060d6207c0fc06e4673764a6980da775210;hp=f7177759aeabe7865ed1f14f72c10d488efd277f;hpb=98856488516fbc8ba95bf0fd2fb739575da9ac5a;p=utils diff --git a/system/spring/src/main/java/org/wamblee/system/spring/SpringComponent.java b/system/spring/src/main/java/org/wamblee/system/spring/SpringComponent.java index f7177759..0e54deae 100644 --- a/system/spring/src/main/java/org/wamblee/system/spring/SpringComponent.java +++ b/system/spring/src/main/java/org/wamblee/system/spring/SpringComponent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2007 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.spring; import java.util.Map; @@ -85,7 +100,7 @@ public class SpringComponent extends AbstractComponent { } @Override - protected void doStart(String aContext) { + protected void doStart() { SpringComponent old = THIS.get(); THIS.set(this); @@ -102,7 +117,7 @@ public class SpringComponent extends AbstractComponent { .addBeanFactoryPostProcessor(new PropertySetter(_properties)); _context.refresh(); - exposeProvidedServices(aContext); + exposeProvidedServices(); } catch (Exception e) { throw new SystemAssemblyException( "Failed to assemble spring system", e); @@ -111,16 +126,16 @@ public class SpringComponent extends AbstractComponent { } } - private void exposeProvidedServices(String aContext) { + private void exposeProvidedServices() { // Call addService for each provided service. for (String name : _provided.keySet()) { Object svc = _context.getBean(name); if (svc == null) { - throw new IllegalArgumentException(aContext + ": service '" + throw new IllegalArgumentException(getQualifiedName() + ": service '" + name + "' is null"); } - addService(aContext, _provided.get(name), svc); + addService(_provided.get(name), svc); } }