dev@glassfish.java.net

Re: WebSniffer and OSGi

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Thu, 24 Apr 2008 10:09:49 -0700

On Apr 24, 2008, at 9:49 AM, Roberto Chinnici wrote:

> While implementing the Phobos container for V3, I saw this comment
> in the code for the WebSniffer (in the org.glassfish.web:gf-web-
> connector module):
>
> // Commented out by Sahoo, as in OSGi environment, we can't support
> // Module.addImport. So, temporarily we add webtier to the dependency
> // list of gf-web-sniffer.
> // public Module[] setup(String containerHome, Logger logger)
> throws IOException {
> // Module[] modules = new Module[1];
> // modules[0] =
> modulesRegistry.makeModuleFor("org.glassfish.web:webtier", null);
> // if (modules[0]==null) {
> // throw new IOException("Webtier module not found, web
> container is not installed or found");
> // }
> // return modules;
> // }
>
> This means that the sniffer module depends on the main web tier
> module, which defeats the purpose of sniffers. Also, this is an
> obstacle to providing a small distribution, because inclusion of the
> sniffer will trigger inclusion of the whole web container.
>
> I understand that this is a temporary measure, but going forward
> what's going to be the mechanism to enable sniffers to dynamically
> load the container they sniff for?
something very similar to the code above.
> Will the HK2 module registry APIs call into the OSGi layer to
> install and start the dependent bundle?
yes

> Or is there going to be a new API?
>
there might be one to take care of the downloading part etc... but so
far we have not decided how the user experience should be when a
container is missing and should be installed + the relationship to IPS.

jerome

> Thanks,
> Roberto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>