dev@glassfish.java.net

Re: ASMain() does not work in OSGi mode

From: Sahoo <sahoo_at_sun.com>
Date: Wed, 25 Jun 2008 22:30:51 +0530

Vivek Pandey wrote:
> 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.

I am confused. If something is used during deployment, why is that
expected to be passed via ASMain, which is called during bootstrap process.

Thanks,
Sahoo