You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Rob Walker <ro...@ascert.com> on 2008/10/13 19:00:00 UTC

Struggling to update to latest Felix version

Wrestling with trying to get our App working with latest Felix version.

Figured out that cache dir property names have change, and now need to 
set: "org.osgi.framework.storage"

Also worked out that the Map passed in gets copied, so need to manually 
expand our var substitution too (this may have been the case before in 
fact), plus the old "embedded" property doesn't seem to be needed

Can't seem to figure yet why none of my felix.auto.install.<n> or 
felix.auto.start.<n> bundles are loading and starting though.

Any pointers?

-- Rob


Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com


Re: Struggling to update to latest Felix version

Posted by "Richard S. Hall" <he...@ungoverned.org>.

Rob Walker wrote:
> Wrestling with trying to get our App working with latest Felix version.
>
> Figured out that cache dir property names have change, and now need to 
> set: "org.osgi.framework.storage"
>
> Also worked out that the Map passed in gets copied, so need to 
> manually expand our var substitution too (this may have been the case 
> before in fact), plus the old "embedded" property doesn't seem to be 
> needed

p.s. Yes, embedded is not necessary any more since Felix will never call 
System.exit()...this is the job of the launcher.

>
> Can't seem to figure yet why none of my felix.auto.install.<n> or 
> felix.auto.start.<n> bundles are loading and starting though.
>
> Any pointers?
>
> -- Rob
>
>
> Ascert - Taking systems to the Edge
> robw@ascert.com
> +44 (0)20 7488 3470
> www.ascert.com
>

Re: Struggling to update to latest Felix version

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Rob,

It sounds like you are playing with the trunk version. :-)

First changed some of the launching API a few releases ago, it now works
more like what is in:

    http://felix.apache.org/site/launching-and-embedding-apache-felix.html

The above page should show you how to get the auto properties working,
but the short description is that auto-property processing was moved out
of Felix and into Main. This is true of property substitution too.

Now trunk has even gone further in changing the embedding API, you can
read about some of those changes here:

    http://issues.apache.org/jira/browse/FELIX-754
    http://issues.apache.org/jira/browse/FELIX-755
    http://issues.apache.org/jira/browse/FELIX-753

This last issue doesn't have too much information in it, but you could
look at RFC 132 in the next OSGi early release spec, otherwise peek at
the associated commits. Here is a short summary:

Felix class implements a new SystemBundle interface:

public interface SystemBundle extends Bundle {
    public FrameworkEvent init() throws BundleException;
    public void waitForStop(long timeout) throws InterruptedException;
}

For the most part, this works like Felix has for a while now, which is
the Felix class is the System Bundle, just create an instance and call
start() to start it and stop() to shut it down. The big change, as you
noticed, is that all properties are passed into the constructor in a
single Map. See the current Main in trunk to see how it works.

Hope some of this helps. I will update our docs once the changes settle
down.

-> richard


Rob Walker wrote:
> Wrestling with trying to get our App working with latest Felix version.
>
> Figured out that cache dir property names have change, and now need to 
> set: "org.osgi.framework.storage"
>
> Also worked out that the Map passed in gets copied, so need to 
> manually expand our var substitution too (this may have been the case 
> before in fact), plus the old "embedded" property doesn't seem to be 
> needed
>
> Can't seem to figure yet why none of my felix.auto.install.<n> or 
> felix.auto.start.<n> bundles are loading and starting though.
>
> Any pointers?
>
> -- Rob
>
>
> Ascert - Taking systems to the Edge
> robw@ascert.com
> +44 (0)20 7488 3470
> www.ascert.com
>


Re: Struggling to update to latest Felix version

Posted by Rob Walker <ro...@ascert.com>.
Great - thanks for the pointers!
It was the shift to Main that I'd missed - we did upgrade sometime after 
property handling change, and so were instantiating Felix direct and 
calling start(), so had missed the migration of old style startup back 
to Main.
-- Rob

Richard S. Hall wrote:
> Rob,
>
> It sounds like you are playing with the trunk version. :-)
>
> First changed some of the launching API a few releases ago, it now 
> works more like what is in:
>
>    http://felix.apache.org/site/launching-and-embedding-apache-felix.html
>
> The above page should show you how to get the auto properties working, 
> but the short description is that auto-property processing was moved 
> out of Felix and into Main. This is true of property substitution too.
>
> Now trunk has even gone further in changing the embedding API, you can 
> read about some of those changes here:
>
>    http://issues.apache.org/jira/browse/FELIX-754
>    http://issues.apache.org/jira/browse/FELIX-755
>    http://issues.apache.org/jira/browse/FELIX-753
>
> This last issue doesn't have too much information in it, but you could 
> look at RFC 132 in the next OSGi early release spec, otherwise peek at 
> the associated commits. Here is a short summary:
>
> Felix class implements a new SystemBundle interface:
>
> public interface SystemBundle extends Bundle {
>    public FrameworkEvent init() throws BundleException;
>    public void waitForStop(long timeout) throws InterruptedException;
> }
>
> For the most part, this works like Felix has for a while now, which is 
> the Felix class is the System Bundle, just create an instance and call 
> start() to start it and stop() to shut it down. The big change, as you 
> noticed, is that all properties are passed into the constructor in a 
> single Map. See the current Main in trunk to see how it works.
>
> Hope some of this helps. I will update our docs once the changes 
> settle down.
>
> -> richard
>
>
> Rob Walker wrote:
>> Wrestling with trying to get our App working with latest Felix version.
>>
>> Figured out that cache dir property names have change, and now need 
>> to set: "org.osgi.framework.storage"
>>
>> Also worked out that the Map passed in gets copied, so need to 
>> manually expand our var substitution too (this may have been the case 
>> before in fact), plus the old "embedded" property doesn't seem to be 
>> needed
>>
>> Can't seem to figure yet why none of my felix.auto.install.<n> or 
>> felix.auto.start.<n> bundles are loading and starting though.
>>
>> Any pointers?
>>
>> -- Rob
>>
>>
>> Ascert - Taking systems to the Edge
>> robw@ascert.com
>> +44 (0)20 7488 3470
>> www.ascert.com
>>

-- 


Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com