geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vamsavardhana Reddy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-438) Deployer.deploy arguments inconsistent
Date Thu, 28 Dec 2006 16:25:24 GMT
    [ http://issues.apache.org/jira/browse/GERONIMO-438?page=comments#action_12461214 ] 
            
Vamsavardhana Reddy commented on GERONIMO-438:
----------------------------------------------

In trunk(rev 490751), org.apache.geronimo.deployment.Deploy has three deploy methods.
  1.  public List deploy(boolean inPlace, File moduleFile, File planFile) throws DeploymentException;
  2.  public List deploy(boolean inPlace, File moduleFile, File planFile, String targetConfigStore)
throws DeploymentException;
  3.  public List deploy(boolean inPlace,
            File planFile,
            File moduleFile,
            File targetFile,
            boolean install,
            String mainClass,
            String mainGBean, String mainMethod, String manifestConfigurations, String classPath,
            String endorsedDirs,
            String extensionDirs,
            String targetConfigurationStore) throws DeploymentException;

3rd method is called by the 2nd method.

OBSERVATION 1:
By searching the workspace for Deployer.deploy() I found that org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy()
and org.apache.geronimo.mavenplugins.car.PackageMojo.invokeDeployer() are the only places
where Deployer.deploy() is being invoked through kernel.invoke().  AbstractDeployCommand.doDeploy()
is using the 2nd method and PackageMojo.invokeDeployer() is using the 3rd method.
    
OBSERVATION 2:
Making the the 3rd method as private, removing the method from GBeanInfo and modifying PackageMojo.invokeDeployer()
to invoke 2nd method instead of 3rd did not result in any build failure.  This means PackageMojo.invokeDeployer()
may be the only place where 3rd method is being used externally.

CONCLUSION:
Option 1:  Get rid of 3rd method from Deployer GBean and modify PackageMojo.invokeDeployer()
to use 2nd method.
Option 2:  Modify 3rd method to reorder the moduleFile and planFile arguments and update 2nd
method and PackageMojo.invokeDeployer() to account for the reordering.

Am I missing anything?  Could there be any other place where the 3rd method is being used?


> Deployer.deploy arguments inconsistent
> --------------------------------------
>
>                 Key: GERONIMO-438
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-438
>             Project: Geronimo
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.0-M2
>            Reporter: Aaron Mulder
>             Fix For: Wish List
>
>
> One deploy method starts with the arguments:
>   File module, File plan
> Another overloaded deploy method starts with the arguments:
>   File plan, File module
> These should not be reversed, but we need to carefully hunt down usages since the types
alone won't cause the usages to be flagged if one is switched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message