dev@glassfish.java.net

Re: ASMain() does not work in OSGi mode

From: Sahoo <sahoo_at_sun.com>
Date: Thu, 26 Jun 2008 00:10:54 +0530

Vivek Pandey wrote:
>>
>> I am confused. If something is used during deployment,
> Let me explain:
>
> glassfish gem is basically glassfish nucleus + some ruby code. There
> is not separate bootstrap and deployment phase. The way users run it
> (think like Jetty):
>
> glassfish_rails [OPTIONS] <railsappdirectory>
>
> Here glassfish_rails is the ruby script that calls ASMain(String
> args). Here args would be anything that is specified on the CLI of
> glassfish_rails. The way it worked with HK2 is that ASMainHK2 would
> call bootstrap.Main which will create StartupContext from the passed
> args and configure the runtime accordingly.
>
HK2 works differently from OSGi. As I said, there is no standard way to
pass any initialization parameters to a bundle.You can always set the
necessary String[] in a system property and read it in your module.

Thanks,
Sahoo