felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Incompatible embedded Felix API changes
Date Wed, 27 Jun 2007 07:43:12 GMT
Hello everyone.

This message is particularly important for anyone who embeds Felix into 
their own projects (i.e., directly creates an instance of Felix).

Two weeks ago I was working on simplifying the Felix shutdown process, 
since it is somewhat circular and confusing. During that process it 
dawned on me that there is a better way to handle the entire way we 
create Felix instances and start/stop the framework.

In summary, the idea is to have the Felix class implement the Bundle 
interface; thus, when you create an instance of Felix what you get in 
return is the actual system bundle.

In this scenario, the Bundle.start()/Bundle.stop() methods will be used 
to start/stop the framework, respectively. All other methods will work 
the way that the current system bundle methods work (generally as 
defined by the spec). Following this approach will not expose any 
methods that are not already currently exposed by the system bundle. 
Further, it will actually leverage the standard Bundle API to provide 
access to what was previously framework-specific API (e.g., typically 
when embedding Felix, the host application needs access to the system 
bundle context, now it can get the system bundle context via the 
standard Bundle.getBundleContext() method).

The current approach will further be modified so that the configuration 
property resolver and the system bundle activator list will be passed 
into the Felix constructor, instead of the Felix.start() method.

I almost have these changes ready to commit (hopefully next week), so 
this message serves as advanced warning that this will break embedding 
applications; however, converting to the new API should be very simple. 
For those using the standard Felix launcher, this will not impact you at 
all.

When I commit these changes I will also update the "launching and 
embedding" documentation. I will make an announcement when all of this 
happens.

Feedback and input is welcome.

-> richard

Mime
View raw message