You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Duncan Child <du...@gmail.com> on 2010/01/21 00:45:03 UTC

Embedding Felix Questions

I am working on embedding Felix into a large application. So far, I
can load bundles into the container and they work fine. The next step
of communicating between the main app and the container is causing me
some grief though.

I was happy to see that Chapter 11 of OSGi in Action is now available
for download from the Manning EAP. Will the source code for that
chapter be available on the google hosted svn repository any time
soon? I would like to try and run the TrapezoidShape service to see
how this is supposed to work.

Looking at the example on the page
http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
there is a Lookup example. I guess that 'public class Lookup' should
be an interface? Is there a complete running example of this code that
I could try and get running in my environment?

Thanks for any suggestions,

Duncan

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


Re: Embedding Felix Questions

Posted by Duncan Child <du...@gmail.com>.
Thanks to the sample code that Vadeg and Richard sent me I was able to
get the Lookup example code to run. The only change required from the
code on the web page was that Lookup needs to be an interface or
abstract class for it to work.

Thank you for your help and suggestions,

Duncan




On Thu, Jan 21, 2010 at 7:45 AM, Vadeg <ni...@gmail.com> wrote:
> Here you are :)
>
> This is an implementation of example from documentation. It consists of
> three modules:
> 1. app
> Sample java Main class, which starts felix
>
> 2. sample-api
> Jar, which contains interfaces for bundle
>
> 3. sample-bundle
> Simple bundle, which creates object and register it using interface from
> sample-api
>
> To run, example, please change property "felix.auto.deploy.dir" to
> <your_project_path>/sample_bundle/target
>
> Example starts Felix with one bundle, then it searches bundles using
> interface name and calls "hello" method. Result prints to sout.
>
> This example is full copy
>
> Duncan Child wrote:
>>
>> I am working on embedding Felix into a large application. So far, I
>> can load bundles into the container and they work fine. The next step
>> of communicating between the main app and the container is causing me
>> some grief though.
>>
>> I was happy to see that Chapter 11 of OSGi in Action is now available
>> for download from the Manning EAP. Will the source code for that
>> chapter be available on the google hosted svn repository any time
>> soon? I would like to try and run the TrapezoidShape service to see
>> how this is supposed to work.
>>
>> Looking at the example on the page
>>
>> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
>> there is a Lookup example. I guess that 'public class Lookup' should
>> be an interface? Is there a complete running example of this code that
>> I could try and get running in my environment?
>>
>> Thanks for any suggestions,
>>
>> Duncan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

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


Re: Embedding Felix Questions

Posted by Vadeg <ni...@gmail.com>.
Here you are :)

This is an implementation of example from documentation. It consists of 
three modules:
1. app
Sample java Main class, which starts felix

2. sample-api
Jar, which contains interfaces for bundle

3. sample-bundle
Simple bundle, which creates object and register it using interface from 
sample-api

To run, example, please change property "felix.auto.deploy.dir" to 
<your_project_path>/sample_bundle/target

Example starts Felix with one bundle, then it searches bundles using 
interface name and calls "hello" method. Result prints to sout.

This example is full copy

Duncan Child wrote:
> I am working on embedding Felix into a large application. So far, I
> can load bundles into the container and they work fine. The next step
> of communicating between the main app and the container is causing me
> some grief though.
>
> I was happy to see that Chapter 11 of OSGi in Action is now available
> for download from the Manning EAP. Will the source code for that
> chapter be available on the google hosted svn repository any time
> soon? I would like to try and run the TrapezoidShape service to see
> how this is supposed to work.
>
> Looking at the example on the page
> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
> there is a Lookup example. I guess that 'public class Lookup' should
> be an interface? Is there a complete running example of this code that
> I could try and get running in my environment?
>
> Thanks for any suggestions,
>
> Duncan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>   


Re: Embedding Felix Questions

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/20/10 18:45, Duncan Child wrote:
> I am working on embedding Felix into a large application. So far, I
> can load bundles into the container and they work fine. The next step
> of communicating between the main app and the container is causing me
> some grief though.
>
> I was happy to see that Chapter 11 of OSGi in Action is now available
> for download from the Manning EAP. Will the source code for that
> chapter be available on the google hosted svn repository any time
> soon? I would like to try and run the TrapezoidShape service to see
> how this is supposed to work.
>    

Yes, it should be available soon...I think we were only waiting to have 
it better integrated into the overall build system for the examples. I 
can send you the code directly if you wish.

> Looking at the example on the page
> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
> there is a Lookup example. I guess that 'public class Lookup' should
> be an interface?

Technically, it doesn't need to be an interface, but in this case it was 
intended to be one, otherwise we'd have to list the class as abstract.

> Is there a complete running example of this code that
> I could try and get running in my environment?
>    

The examples in the embedding page should be fairly complete, but it is 
true I never actually tested them.

-> richard

> Thanks for any suggestions,
>
> Duncan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

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