dev@glassfish.java.net

Re: ASMain() does not work in OSGi mode

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Wed, 25 Jun 2008 09:09:25 -0700

Sahoo wrote:
> Vivek,
>
> You are right that in OSGi mode, args passed using ASMain.main(args)
> is not passed to the startupModule. That's because there is no way
> to pass any object to an activated bundle. A bundle should have
> its own way of configuring itself either by reading from a file or by
> use of properties.

What do you mean by the bundle? jruby module (Sniffer/Deployer etc.) is
an OSGi bundle but it expects certain values to be provided to it at the
runtime.

The StartupContext which has these values is passed on to Deployer thru
DeployerContext. In my case RailsDeployer expects StartupContext to have
these values and it does not
> Can your code use anything like that?
>
I am not sure how my code can get to it. Reading from a file or property
does not apply to this case. The usecase is that the properties are
passed thru CLI or glassfish gem. These values are given to ASMain and
finally reaches to the Deployer as StartupContext.

-vivek.
> Thanks,
> Sahoo
>
> Vivek Pandey wrote:
>> Sahoo/Jerome,
>>
>> In glassfish JRuby gem the v3 bootstrap happens thru
>> ASMain.main(args). The args are the options that user might have
>> passed, such as num of runtimes, context etc, which results into
>> StartupContext inside ASMainOSGi or in the HK2 mode, inside
>> bootstrap.Main (hk2.jar).
>>
>> With HK2 it works fine but with OSGi I dont think there is any code
>> that passes on StartupContext anywhere.
>>
>> I need this fixed with ASMainFelix/ASMainOSGi in order to make gem
>> OSGi aware, till then the gem is only going to run in HK2 mode.
>>
>>
>> -vivek.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>