From: Mathieu Baudier Date: Mon, 27 Jul 2009 13:49:03 +0000 (+0000) Subject: Fix issue with name X-Git-Tag: argeo-slc-2.1.7~1610 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=ef27cc5d96275536a7c45c3bea1f84900469ab7c;p=gpl%2Fargeo-slc.git Fix issue with name git-svn-id: https://svn.argeo.org/slc/trunk@2779 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/vbox/VBoxMachine.java b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/vbox/VBoxMachine.java index effa3da86..2b561b6a8 100644 --- a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/vbox/VBoxMachine.java +++ b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/vbox/VBoxMachine.java @@ -6,10 +6,13 @@ import org.argeo.slc.deploy.DeployedSystem; import org.argeo.slc.deploy.DeploymentData; import org.argeo.slc.deploy.TargetData; import org.springframework.beans.factory.BeanNameAware; +import org.springframework.beans.factory.InitializingBean; -public class VBoxMachine implements DeployedSystem, BeanNameAware { +public class VBoxMachine implements DeployedSystem, BeanNameAware, + InitializingBean { private String deployedSystemId = null; private String name; + private String beanName; public String getDeployedSystemId() { return deployedSystemId; @@ -39,8 +42,13 @@ public class VBoxMachine implements DeployedSystem, BeanNameAware { this.deployedSystemId = deployedSystemId; } - public void setBeanName(String name) { - this.name = name; + public void setBeanName(String beanName) { + this.beanName = name; + } + + public void afterPropertiesSet() throws Exception { + if (name == null) + name = beanName; } }