[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re[2]: [equinox-dev] OSGi and parameters
|
I think this sounds like a very useful service. Why not just
experiment with it in Equinox and then when it stabilizes, we make an
RFP for the OSGi standardization.
Kind regards,
Peter Kriens
JM> Would there be any interest in adding a command line or paramters service
JM> to OSGi? I realise that everything likely could be done via -D but this
JM> not very natural for applications. For example, there are various stages
JM> of running a system like Eclipse. Various arguments are specific to these
JM> stages. A good example is the AntRunner. Eclipse itself has a number of
JM> args which Pascal outlined. if you spec "-application ...antrunner" then
JM> there are a set of args which are passed to the standard Ant code. Part
JM> of this is a freeform argument list which is in turn passed to whatever
JM> ant scripts are running.
JM> Several things to note...
JM> - Ant gets confused by the Eclipse args and so should not see them.
JM> (Eclipse does this by striping off the args as it consumes them. By the
JM> time it gets to the application only the non-eclipse args are left. This
JM> is not entirely satisfactory since there could be arg overlaps and so the
JM> need to strip would be ambiguous)
JM> - We don't control the ant code so need to present a command line it
JM> understands
JM> - the ant command line is relatively freeform so we can't just look for
JM> pre-defined args...
JM> A simple framework service would allow for variations in the
JM> implementation of command lines but standardize the usage model so bundles
JM> caring about command lines would run anywhere.
JM> Jeff
JM> Benjamin Reed <breed@xxxxxxxxxxxxxxx>
JM> Sent by: equinox-dev-admin@xxxxxxxxxxx
JM> 06/25/2003 01:34 PM
JM> To: Pascal Rapicault/Ottawa/IBM@IBMCA
JM> cc: equinox-dev@xxxxxxxxxxx
JM> Subject: Re: [equinox-dev] OSGi and parameters
JM> Currently, the only way command line parameters get passed is if the -D
JM> flag is used to set a system property. Otherwise, the concept of a
JM> command line is totally absent from OSGi.
JM> If I understand you properly, you would have a framework service that
JM> would expose the command line with something like:
JM> package org.eclipse.osgi;
JM> public interface CommandLine {
JM> public String []getArgs();
JM> }
JM> That would be the OSGi style.
JM> The other option is that you could stick with the
JM> BootLoader.getCommandLineArgs() way. and just have interested bundles
JM> import the package.
JM> Either way, as you point out, you will need to do something
JM> implementation dependent. Although, it really isn't that big of a deal,
JM> since you will just be modifying the launching code.
JM> ben
JM> Pascal Rapicault wrote:
>>
>> Hello,
>>
>> I would like to know what is the usual way of passing parameters to
>> "application" and/or "bundle" running in OSGi.
>>
>> Basically the case I'm trying to resolve is the following:
>> today in eclipse: a set of parameters are passed on startup (on
>> the command line), and those parameters are
>> then surfaced in eclipse through the Boot plugin. This gives a
>> uniform way for people to access parameters.
>>
>> How can I give the bundles access to the command line parameters, in a
>> nice way?
>>
>> My current idea is to create a implementation depend service that would
>> surface parameters.
>>
>> Any suggestions? Any ideas? Any comments?
>>
>> PaScaL
JM> _______________________________________________
JM> equinox-dev mailing list
JM> equinox-dev@xxxxxxxxxxx
JM> http://dev.eclipse.org/mailman/listinfo/equinox-dev
--
Peter Kriens Tel. +46 30039800
Finnasandsvägen 22 Fax. +46 30039805
SE-43933 Onsala Mob. +46705950899