felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: Embedding felix and using felix.auto.deploy.dir
Date Mon, 26 Sep 2011 12:43:11 GMT
On 9/26/11 7:37 AM, David Griffin wrote:
> Hi all,
>
>
>
> this is my first posting to this list. I am currently researching potential
> solutions to the creation of an extensible Java application and OSGi/Felix
> appear to provide one solution, with various future proofing capabilities
> (for my currently simplistic requirements). So, I'm new to the world of OSGi
> &  Felix.
>
>
>
> I'm finding the going quite tough learning about these technologies, due to
> the sheer volume of information, but I have finally managed to locate, build
> and run a sample application which seems to do almost everything I need
> (http://felix.apache.org/site/apache-felix-application-demonstration.html).
> The only additional feature I would like is the ability to configure the
> embedded Felix framework to auto-install and auto-start (what Felix seems to
> refer to as auto-deploy) all bundle JARs found in a specified bundle folder.
> Felix documentation suggests that this is done by default, using the
> "./bundle" sub-directory of the current directory, but this doesn't seem to
> work for me, so I suspect the scenario is a little different with an
> embedded Felix framework.
>
>
>
> Can anyone point in the right direction for how to instruct Felix (when
> embedded into an application) to auto-deploy all JARs found in a specified
> folder?

There isn't too much difference between launching the framework and 
embedding a framework instance into an existing application. In both 
cases you are creating an instance an interacting with it externally to 
get it to do something internally.

By default, the Felix framework doesn't do anything with any bundles 
when you create an instance of it. It just sits there and waits for you 
to tell it to do something. The example application you refer to above 
(although it is a little outdated, since it doesn't use the most recent 
Felix framework) provides one example. If you want to see another 
example, just look at the source code for Felix Main, which is the 
standard Felix framework launcher. It is quite simple and does the 
auto-deploy functionality you describe. You can use this as a starting 
point.

Regarding other examples, there is an updated example of the "paint" 
program in the OSGi In Action book, the source code is available here:

     http://code.google.com/p/osgi-in-action/

Look in the chapter 13 source directory.

-> richard

>
>
>
> Thanks in advance.
>
>
>
> Dave
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message