geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor" <jga...@gmail.com>
Subject Re: Help needed for o.a.g.deployment.plugin.local.AbstractDeployCommand.doDeploy
Date Mon, 18 Aug 2008 14:50:41 GMT
The AbstractDeployCommand.doDeploy() function first calls
kernel.invoke(deployer, "deploy", deployParams, DEPLOY_SIG) which
causes the application to be deployed in the server.  So at the time
the isWebApp() method is called, the application is already deployed
and the gbeans are there.

Jarek

On Mon, Aug 18, 2008 at 4:24 AM, Jacek Laskowski <jacek@laskowski.net.pl> wrote:
> Hi,
>
> I've been looking into how deployment works in Geronimo and I think I
> found a potential bug. In doDeploy at line 126:
>
>  TargetModuleIDImpl moduleID = new TargetModuleIDImpl(target,
> parentName, childIDs);
>  if(isWebApp(kernel, parentName)) {
>    moduleID.setType(ModuleType.WAR);
>  }
>
> there's a check to mark a module as a webapp. The check is performed
> with isWebApp, which is a query to the kernel whether the webapp is
> available as GBean (it's already deployed, isn't it?):
>
>    public static boolean isWebApp(Kernel kernel, String configName) {
>        Map filter = new HashMap();
>        filter.put("j2eeType", "WebModule");
>        filter.put("name", configName);
>        Set set = kernel.listGBeans(new AbstractNameQuery(null, filter));
>        return set.size() > 0;
>    }
>
> I think it won't work. It's not yet available (=deployed?) as a gbean
> as it's being deployed at the time the check is being performed. Am I
> correct in my thinking? Should it be removed/fixed somehow? Any
> guidance appreciated.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>

Mime
View raw message