You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gd...@apache.org on 2006/04/16 03:24:03 UTC

svn commit: r394422 - in /geronimo/branches/1.1/modules: deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/ deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/ deploy-tool/src/java/org/apache/geronimo/deployment/cli/

Author: gdamour
Date: Sat Apr 15 18:24:00 2006
New Revision: 394422

URL: http://svn.apache.org/viewcvs?rev=394422&view=rev
Log:
Attempt to address Aaron's -1:

-1 to this change: the DeploymentManager can be used for many
operations in succession, and as written, the in-place flag is
persistent once set, whereas it my opinion in should only apply to a
single operation and if you do another deployment on the same
deployment manager you should need to specify the flag each time if
you want it each time

Modified:
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
    geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java?rev=394422&r1=394421&r2=394422&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java (original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java Sat Apr 15 18:24:00 2006
@@ -39,6 +39,14 @@
         this.inPlace = inPlace;
     }
 
+    public CommandContext(CommandContext prototype) {
+        this.logErrors = prototype.logErrors;
+        this.verbose = prototype.verbose;
+        this.username = prototype.username;
+        this.password = prototype.password;
+        this.inPlace = prototype.inPlace;
+    }
+
     public boolean isLogErrors() {
         return logErrors;
     }

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?rev=394422&r1=394421&r2=394422&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Sat Apr 15 18:24:00 2006
@@ -247,7 +247,7 @@
     }
 
     public void setCommandContext(CommandContext commandContext) {
-        this.commandContext = commandContext;
+        this.commandContext = new CommandContext(commandContext);
     }
 
     public static ModuleType convertModuleType(ConfigurationModuleType type) {

Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java?rev=394422&r1=394421&r2=394422&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java Sat Apr 15 18:24:00 2006
@@ -63,9 +63,15 @@
                         "Cannot perform in-place deployment.");
             }
             JMXDeploymentManager jmxMgr = (JMXDeploymentManager) mgr;
-            jmxMgr.setInPlace(true);
+            try {
+                jmxMgr.setInPlace(true);
+                return mgr.distribute(tlist, module, plan);
+            } finally {
+                jmxMgr.setInPlace(false);
+            }
+        } else {
+            return mgr.distribute(tlist, module, plan);
         }
-        return mgr.distribute(tlist, module, plan);
     }
 
     protected String getAction() {



Re: svn commit: r394422 - in /geronimo/branches/1.1/modules: deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/ deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/ deploy-tool/src/java/org/apache/geronimo/deployment/cli/

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Yeah, but I don't think having a bunch of extra flags where you need
to cast the DeploymentManager to some implementation class and then
set the flags and then let it go back to being a DeploymentManager
really counts as "sticking to the JSR-88 API".  You might as well just
put some methods in the GeronimoDeploymentManager interface and cast
the DeploymentManager to that, so at least the client code is not
dependent on a specific DeploymentManager implementation class.

Thanks,
    Aaron

On 4/16/06, Gianny Damour <gi...@optusnet.com.au> wrote:
> Actually, my first pass was an ExtendedDeploymentManager defining a
> distribute method taking such an additional parameter. I drop this idea
> to implement this one because I wanted to stick to the JSR88 API.
>
> Thanks,
> Gianny
>
> Aaron Mulder wrote:
>
> >OK.  A little cheesy to set the flag, do the thing, and then unset the
> >flag, but I guess it works for 1.1.  Maybe I'll put in a JIRA to make
> >this work better somehow (like call a Geronimo-specific method on the
> >DeploymentManager that implies or takes an argument for an in-place
> >deployment).
> >
> >Thanks,
> >    Aaron
> >
> >On 4/15/06, gdamour@apache.org <gd...@apache.org> wrote:
> >
> >
> >>Author: gdamour
> >>Date: Sat Apr 15 18:24:00 2006
> >>New Revision: 394422
> >>
> >>URL: http://svn.apache.org/viewcvs?rev=394422&view=rev
> >>Log:
> >>Attempt to address Aaron's -1:
> >>
> >>-1 to this change: the DeploymentManager can be used for many
> >>operations in succession, and as written, the in-place flag is
> >>persistent once set, whereas it my opinion in should only apply to a
> >>single operation and if you do another deployment on the same
> >>deployment manager you should need to specify the flag each time if
> >>you want it each time
> >>
> >>Modified:
> >>    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
> >>    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
> >>    geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
> >>
> >>Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
> >>URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java?rev=394422&r1=394421&r2=394422&view=diff
> >>==============================================================================
> >>--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java (original)
> >>+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java Sat Apr 15 18:24:00 2006
> >>@@ -39,6 +39,14 @@
> >>         this.inPlace = inPlace;
> >>     }
> >>
> >>+    public CommandContext(CommandContext prototype) {
> >>+        this.logErrors = prototype.logErrors;
> >>+        this.verbose = prototype.verbose;
> >>+        this.username = prototype.username;
> >>+        this.password = prototype.password;
> >>+        this.inPlace = prototype.inPlace;
> >>+    }
> >>+
> >>     public boolean isLogErrors() {
> >>         return logErrors;
> >>     }
> >>
> >>Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
> >>URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?rev=394422&r1=394421&r2=394422&view=diff
> >>==============================================================================
> >>--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original)
> >>+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Sat Apr 15 18:24:00 2006
> >>@@ -247,7 +247,7 @@
> >>     }
> >>
> >>     public void setCommandContext(CommandContext commandContext) {
> >>-        this.commandContext = commandContext;
> >>+        this.commandContext = new CommandContext(commandContext);
> >>     }
> >>
> >>     public static ModuleType convertModuleType(ConfigurationModuleType type) {
> >>
> >>Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
> >>URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java?rev=394422&r1=394421&r2=394422&view=diff
> >>==============================================================================
> >>--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java (original)
> >>+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java Sat Apr 15 18:24:00 2006
> >>@@ -63,9 +63,15 @@
> >>                         "Cannot perform in-place deployment.");
> >>             }
> >>             JMXDeploymentManager jmxMgr = (JMXDeploymentManager) mgr;
> >>-            jmxMgr.setInPlace(true);
> >>+            try {
> >>+                jmxMgr.setInPlace(true);
> >>+                return mgr.distribute(tlist, module, plan);
> >>+            } finally {
> >>+                jmxMgr.setInPlace(false);
> >>+            }
> >>+        } else {
> >>+            return mgr.distribute(tlist, module, plan);
> >>         }
> >>-        return mgr.distribute(tlist, module, plan);
> >>     }
> >>
> >>     protected String getAction() {
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
>
>
>

Re: svn commit: r394422 - in /geronimo/branches/1.1/modules: deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/ deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/ deploy-tool/src/java/org/apache/geronimo/deployment/cli/

Posted by Gianny Damour <gi...@optusnet.com.au>.
Actually, my first pass was an ExtendedDeploymentManager defining a 
distribute method taking such an additional parameter. I drop this idea 
to implement this one because I wanted to stick to the JSR88 API.

Thanks,
Gianny

Aaron Mulder wrote:

>OK.  A little cheesy to set the flag, do the thing, and then unset the
>flag, but I guess it works for 1.1.  Maybe I'll put in a JIRA to make
>this work better somehow (like call a Geronimo-specific method on the
>DeploymentManager that implies or takes an argument for an in-place
>deployment).
>
>Thanks,
>    Aaron
>
>On 4/15/06, gdamour@apache.org <gd...@apache.org> wrote:
>  
>
>>Author: gdamour
>>Date: Sat Apr 15 18:24:00 2006
>>New Revision: 394422
>>
>>URL: http://svn.apache.org/viewcvs?rev=394422&view=rev
>>Log:
>>Attempt to address Aaron's -1:
>>
>>-1 to this change: the DeploymentManager can be used for many
>>operations in succession, and as written, the in-place flag is
>>persistent once set, whereas it my opinion in should only apply to a
>>single operation and if you do another deployment on the same
>>deployment manager you should need to specify the flag each time if
>>you want it each time
>>
>>Modified:
>>    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
>>    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
>>    geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
>>
>>Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
>>URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java?rev=394422&r1=394421&r2=394422&view=diff
>>==============================================================================
>>--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java (original)
>>+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java Sat Apr 15 18:24:00 2006
>>@@ -39,6 +39,14 @@
>>         this.inPlace = inPlace;
>>     }
>>
>>+    public CommandContext(CommandContext prototype) {
>>+        this.logErrors = prototype.logErrors;
>>+        this.verbose = prototype.verbose;
>>+        this.username = prototype.username;
>>+        this.password = prototype.password;
>>+        this.inPlace = prototype.inPlace;
>>+    }
>>+
>>     public boolean isLogErrors() {
>>         return logErrors;
>>     }
>>
>>Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
>>URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?rev=394422&r1=394421&r2=394422&view=diff
>>==============================================================================
>>--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original)
>>+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Sat Apr 15 18:24:00 2006
>>@@ -247,7 +247,7 @@
>>     }
>>
>>     public void setCommandContext(CommandContext commandContext) {
>>-        this.commandContext = commandContext;
>>+        this.commandContext = new CommandContext(commandContext);
>>     }
>>
>>     public static ModuleType convertModuleType(ConfigurationModuleType type) {
>>
>>Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
>>URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java?rev=394422&r1=394421&r2=394422&view=diff
>>==============================================================================
>>--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java (original)
>>+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java Sat Apr 15 18:24:00 2006
>>@@ -63,9 +63,15 @@
>>                         "Cannot perform in-place deployment.");
>>             }
>>             JMXDeploymentManager jmxMgr = (JMXDeploymentManager) mgr;
>>-            jmxMgr.setInPlace(true);
>>+            try {
>>+                jmxMgr.setInPlace(true);
>>+                return mgr.distribute(tlist, module, plan);
>>+            } finally {
>>+                jmxMgr.setInPlace(false);
>>+            }
>>+        } else {
>>+            return mgr.distribute(tlist, module, plan);
>>         }
>>-        return mgr.distribute(tlist, module, plan);
>>     }
>>
>>     protected String getAction() {
>>
>>
>>
>>    
>>
>
>
>
>  
>



Re: svn commit: r394422 - in /geronimo/branches/1.1/modules: deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/ deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/ deploy-tool/src/java/org/apache/geronimo/deployment/cli/

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
OK.  A little cheesy to set the flag, do the thing, and then unset the
flag, but I guess it works for 1.1.  Maybe I'll put in a JIRA to make
this work better somehow (like call a Geronimo-specific method on the
DeploymentManager that implies or takes an argument for an in-place
deployment).

Thanks,
    Aaron

On 4/15/06, gdamour@apache.org <gd...@apache.org> wrote:
> Author: gdamour
> Date: Sat Apr 15 18:24:00 2006
> New Revision: 394422
>
> URL: http://svn.apache.org/viewcvs?rev=394422&view=rev
> Log:
> Attempt to address Aaron's -1:
>
> -1 to this change: the DeploymentManager can be used for many
> operations in succession, and as written, the in-place flag is
> persistent once set, whereas it my opinion in should only apply to a
> single operation and if you do another deployment on the same
> deployment manager you should need to specify the flag each time if
> you want it each time
>
> Modified:
>     geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
>     geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
>     geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
>
> Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
> URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java?rev=394422&r1=394421&r2=394422&view=diff
> ==============================================================================
> --- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java (original)
> +++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java Sat Apr 15 18:24:00 2006
> @@ -39,6 +39,14 @@
>          this.inPlace = inPlace;
>      }
>
> +    public CommandContext(CommandContext prototype) {
> +        this.logErrors = prototype.logErrors;
> +        this.verbose = prototype.verbose;
> +        this.username = prototype.username;
> +        this.password = prototype.password;
> +        this.inPlace = prototype.inPlace;
> +    }
> +
>      public boolean isLogErrors() {
>          return logErrors;
>      }
>
> Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
> URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?rev=394422&r1=394421&r2=394422&view=diff
> ==============================================================================
> --- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original)
> +++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Sat Apr 15 18:24:00 2006
> @@ -247,7 +247,7 @@
>      }
>
>      public void setCommandContext(CommandContext commandContext) {
> -        this.commandContext = commandContext;
> +        this.commandContext = new CommandContext(commandContext);
>      }
>
>      public static ModuleType convertModuleType(ConfigurationModuleType type) {
>
> Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
> URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java?rev=394422&r1=394421&r2=394422&view=diff
> ==============================================================================
> --- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java (original)
> +++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java Sat Apr 15 18:24:00 2006
> @@ -63,9 +63,15 @@
>                          "Cannot perform in-place deployment.");
>              }
>              JMXDeploymentManager jmxMgr = (JMXDeploymentManager) mgr;
> -            jmxMgr.setInPlace(true);
> +            try {
> +                jmxMgr.setInPlace(true);
> +                return mgr.distribute(tlist, module, plan);
> +            } finally {
> +                jmxMgr.setInPlace(false);
> +            }
> +        } else {
> +            return mgr.distribute(tlist, module, plan);
>          }
> -        return mgr.distribute(tlist, module, plan);
>      }
>
>      protected String getAction() {
>
>
>