geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment ManagedServer.java AdminServer.java TargetImpl2.java DeploymentReplacerResolver.java
Date Thu, 03 Jun 2004 14:32:51 GMT
gdamour     2004/06/03 07:32:51

  Modified:    sandbox/messaging/src/test/org/apache/geronimo/messaging/admin/deployment
                        DeploymentReplacerResolverTest.java
               sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment
                        ManagedServer.java AdminServer.java
                        TargetImpl2.java DeploymentReplacerResolver.java
  Log:
  Migrate to TargetImpl2.
  
  Revision  Changes    Path
  1.2       +1 -19     incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/admin/deployment/DeploymentReplacerResolverTest.java
  
  Index: DeploymentReplacerResolverTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/admin/deployment/DeploymentReplacerResolverTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeploymentReplacerResolverTest.java	27 May 2004 14:45:58 -0000	1.1
  +++ DeploymentReplacerResolverTest.java	3 Jun 2004 14:32:50 -0000	1.2
  @@ -32,14 +32,6 @@
   {
   
       public void testCustomReplaceObject1() throws Exception {
  -        TargetImpl target = new TargetImpl("test", "description");
  -        ReplacerResolver replacerResolver = new DeploymentReplacerResolver();
  -        TargetImpl2 result = (TargetImpl2) replacerResolver.replaceObject(target);
  -        assertEquals(target.getName(), result.getName());
  -        assertEquals(target.getDescription(), result.getDescription());
  -    }
  -    
  -    public void testCustomReplaceObject2() throws Exception {
           ModuleType type = ModuleType.CAR;
           ReplacerResolver replacerResolver = new DeploymentReplacerResolver();
           ModuleTypeWrapper result =
  @@ -48,16 +40,6 @@
       }
       
       public void testCustomResolveObject1() throws Exception {
  -        TargetImpl target = new TargetImpl("test", "description");
  -        ReplacerResolver replacerResolver = new DeploymentReplacerResolver();
  -        TargetImpl2 tmp = (TargetImpl2) replacerResolver.replaceObject(target);
  -        
  -        TargetImpl result = (TargetImpl) replacerResolver.resolveObject(tmp);
  -        assertEquals(target.getName(), result.getName());
  -        assertEquals(target.getDescription(), result.getDescription());
  -    }
  -    
  -    public void testCustomResolveObject2() throws Exception {
           ModuleType type = ModuleType.CAR;
           ReplacerResolver replacerResolver = new DeploymentReplacerResolver();
           ModuleTypeWrapper tmp =
  
  
  
  1.5       +2 -3      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/ManagedServer.java
  
  Index: ManagedServer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/ManagedServer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ManagedServer.java	2 Jun 2004 11:27:59 -0000	1.4
  +++ ManagedServer.java	3 Jun 2004 14:32:50 -0000	1.5
  @@ -35,7 +35,6 @@
   import org.apache.geronimo.deployment.ConfigurationBuilder;
   import org.apache.geronimo.deployment.DeploymentException;
   import org.apache.geronimo.deployment.plugin.DeploymentServer;
  -import org.apache.geronimo.deployment.plugin.TargetImpl;
   import org.apache.geronimo.deployment.plugin.local.DistributeCommand;
   import org.apache.geronimo.deployment.plugin.local.StartCommand;
   import org.apache.geronimo.deployment.plugin.local.StopCommand;
  @@ -94,7 +93,7 @@
               throw new IllegalArgumentException("Kernel is required");
           }
           
  -        target = new TargetImpl(aNode.getNodeInfo().getName(), null);
  +        target = new TargetImpl2(aNode.getNodeInfo().getName(), null);
           store = aStore;
           kernel = aKernel;
           
  
  
  
  1.4       +2 -3      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/AdminServer.java
  
  Index: AdminServer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/AdminServer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AdminServer.java	1 Jun 2004 12:44:22 -0000	1.3
  +++ AdminServer.java	3 Jun 2004 14:32:50 -0000	1.4
  @@ -37,7 +37,6 @@
   import org.apache.geronimo.deployment.ConfigurationBuilder;
   import org.apache.geronimo.deployment.plugin.DeploymentServer;
   import org.apache.geronimo.deployment.plugin.FailedProgressObject;
  -import org.apache.geronimo.deployment.plugin.TargetImpl;
   import org.apache.geronimo.gbean.WaitingException;
   import org.apache.geronimo.messaging.AbstractEndPoint;
   import org.apache.geronimo.messaging.Node;
  @@ -94,7 +93,7 @@
               ServerInfo info = new ServerInfo();
               info.server =
                   (DeploymentServer) node.factoryEndPointProxy(proxyInfo);
  -            info.target = new TargetImpl(nodeInfo.getName(), null);
  +            info.target = new TargetImpl2(nodeInfo.getName(), null);
               nameToInfo.put(nodeInfo.getName(), info);
           }
       }
  
  
  
  1.2       +5 -7      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/TargetImpl2.java
  
  Index: TargetImpl2.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/TargetImpl2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TargetImpl2.java	27 May 2004 14:45:59 -0000	1.1
  +++ TargetImpl2.java	3 Jun 2004 14:32:50 -0000	1.2
  @@ -21,10 +21,8 @@
   
   import javax.enterprise.deploy.spi.Target;
   
  -import org.apache.geronimo.deployment.plugin.TargetImpl;
  -
   /**
  - * A serializable Target. Should replace TargetImpl.
  + * A serializable Target.
    *
    * @version $Revision$ $Date$
    */
  @@ -35,9 +33,9 @@
       private final String name;
       private final String description;
       
  -    public TargetImpl2(TargetImpl aTarget) {
  -        name = aTarget.getName();
  -        description = aTarget.getDescription();
  +    public TargetImpl2(String aName, String aDescription) {
  +        name = aName;
  +        description = aDescription;
       }
   
       public String getName() {
  
  
  
  1.3       +3 -9      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/DeploymentReplacerResolver.java
  
  Index: DeploymentReplacerResolver.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/admin/deployment/DeploymentReplacerResolver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeploymentReplacerResolver.java	1 Jun 2004 12:44:22 -0000	1.2
  +++ DeploymentReplacerResolver.java	3 Jun 2004 14:32:50 -0000	1.3
  @@ -22,7 +22,6 @@
   import javax.enterprise.deploy.shared.ModuleType;
   import javax.enterprise.deploy.spi.status.DeploymentStatus;
   
  -import org.apache.geronimo.deployment.plugin.TargetImpl;
   import org.apache.geronimo.messaging.io.AbstractReplacerResolver;
   
   /**
  @@ -34,9 +33,7 @@
   {
   
       protected Object customReplaceObject(Object obj) throws IOException {
  -        if ( obj instanceof TargetImpl ) {
  -            return new TargetImpl2((TargetImpl) obj);
  -        } else if ( obj instanceof ModuleType ) {
  +    	if ( obj instanceof ModuleType ) {
               return new ModuleTypeWrapper((ModuleType) obj);
           } else if ( obj instanceof DeploymentStatus ) {
               DeploymentStatus status = (DeploymentStatus) obj;
  @@ -47,10 +44,7 @@
       }
   
       protected Object customResolveObject(Object obj) throws IOException {
  -        if ( obj instanceof TargetImpl2 ) {
  -            TargetImpl2 target = (TargetImpl2) obj; 
  -            return new TargetImpl(target.getName(), target.getDescription());
  -        } else if ( obj instanceof ModuleTypeWrapper ) {
  +        if ( obj instanceof ModuleTypeWrapper ) {
               return ((ModuleTypeWrapper)obj).getModuleType();
           }
           return null;
  
  
  

Mime
View raw message