You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2008/08/27 19:38:41 UTC

How to build a Tuscany OSGi environment?

I'm trying to build a Tuscany environment that includes some of the 
latest Tuscany OSGi integration.

My use case is that I want Tuscany to bootstrap OSGi for me when I start 
a Tuscany node, as it'll help the node load different levels of runtime 
extension and dependency bundles. I want to start with Equinox for now 
(I'll test with Felix later).

I have some questions:

What Tuscany modules do I need to add to my POM as dependencies?

What's the difference between modules extensibility-osgi and 
extensibility-equinox?

What are these two modules responsible for?

node-launcher-osgi has a compile dependency on Felix, can this 
dependency be pushed to another module?

Shouldn't the dependencies on the OSGi JARs in node-launcher-osgi have 
scope 'provided' instead of 'compile'?

Thanks
-- 
Jean-Sebastien

Re: How to build a Tuscany OSGi environment?

Posted by Raymond Feng <en...@gmail.com>.
Hi,

If you configure your project with tuscany-maven-osgi-plugin, the plugin 
will look at the set of dependency jars for the project, some of them are 
tuscany modules (which are already OSGi bundles) and the others are 3rd 
party jars. The plugin will start the OSGi runtime, create bundles out of 
the 3rd party jars and install them with the tuscany bundles into OSGi, then 
use the SCANodeFactory from the OSGi to run the test cases.

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Thursday, August 28, 2008 12:19 PM
To: <us...@tuscany.apache.org>
Subject: Re: How to build a Tuscany OSGi environment?

> ...
> Raymond Feng wrote:
>>>>>> PS: If you use our tuscany-maven-osgi-junit plugin, it will create 
>>>>>> the bundles automatically from the maven dependency list.
> ...
> Jean-Sebastien Delfino wrote:
>>>>> Sorry, I'm having trouble understanding what that means. Aren't the 
>>>>> Tuscany JARs OSGi bundles already?
>
> That question remains as it got skipped in the previous exchanges.
> -- 
> Jean-Sebastien 


Re: How to build a Tuscany OSGi environment?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
...
Raymond Feng wrote:
>>>>> PS: If you use our tuscany-maven-osgi-junit plugin, it will create 
>>>>> the bundles automatically from the maven dependency list.
...
Jean-Sebastien Delfino wrote:
>>>> Sorry, I'm having trouble understanding what that means. Aren't the 
>>>> Tuscany JARs OSGi bundles already?

That question remains as it got skipped in the previous exchanges.
-- 
Jean-Sebastien

Re: How to build a Tuscany OSGi environment?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
> 
> I just added a new module node-launcher-equinox to launch SCA Node using 
> Equinox. It requires:
> 
> tuscany-node-launcher-equinox-1.4-SNAPSHOT.jar
> app-1.0.0-v20070423.jar
> common-3.3.0-v20070426.jar
> contenttype-3.2.100-v20070319.jar
> jobs-3.3.0-v20070423.jar
> osgi-3.3.0-v20070530.jar
> preferences-3.2.100-v20070522.jar
> registry-3.3.0-v20070522.jar
> runtime-3.3.100-v20070530.jar
> 
> Thanks,
> Raymond

Thanks a lot, that's what I'm going to use for testing now.

-- 
Jean-Sebastien

Re: How to build a Tuscany OSGi environment?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
haleh mahbod wrote:
> Hi Raymond,
> Would it  be possible for you to create a wiki page that documents how 
> to use Tuscany with OSGI and we'll link to it from  user documentation? 
> I read this thread multiple times to see if I can do it and I don't 
> think  I have enough info.
>  

Not surprising as this thread is not discussing that :) it's discussing 
how to build it.

-- 
Jean-Sebastien

Re: How to build a Tuscany OSGi environment?

Posted by haleh mahbod <hm...@gmail.com>.
Hi Raymond,
Would it  be possible for you to create a wiki page that documents how to
use Tuscany with OSGI and we'll link to it from  user documentation? I read
this thread multiple times to see if I can do it and I don't think  I have
enough info.

Thanks,
Haleh


On 8/27/08, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> I just added a new module node-launcher-equinox to launch SCA Node using
> Equinox. It requires:
>
> tuscany-node-launcher-equinox-1.4-SNAPSHOT.jar
> app-1.0.0-v20070423.jar
> common-3.3.0-v20070426.jar
> contenttype-3.2.100-v20070319.jar
> jobs-3.3.0-v20070423.jar
> osgi-3.3.0-v20070530.jar
> preferences-3.2.100-v20070522.jar
> registry-3.3.0-v20070522.jar
> runtime-3.3.100-v20070530.jar
>
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Jean-Sebastien Delfino" <js...@apache.org>
> Sent: Wednesday, August 27, 2008 5:43 PM
> To: <us...@tuscany.apache.org>
> Subject: Re: How to build a Tuscany OSGi environment?
>
> Raymond Feng wrote:
>>
>>> I see two lists here:
>>>
>>> 1) A list of jars required to run the node-launcher-osgi (assuming it's
>>> under tuscany\launcher)
>>>
>>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>>> org.apache.felix.framework-1.0.4.jar
>>> org.osgi.compendium-1.0.1.jar
>>> org.osgi.core-1.0.1.jar
>>> org.osgi.foundation-1.0.0.jar
>>> servlet-api-2.5.jar
>>>
>>> 2) A list of OSGi bundles required to start a SCA node (assuming it's
>>> under tuscany\modules or tuscany\lib)
>>>
>>> This varies depending on what extensions are required. This can be one of
>>> the distros +  tuscany-extensibility-osgi-1.4-SNAPSHOT.jar (if not added to
>>> the distro)
>>>
>>> Then we could run the following command:
>>> java -Djava.ext.dirs=.\tuscany\launcher -DTUSCANY_HOME=.\tuscany -jar
>>> .\tuscany\launcher\tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar ...
>>>
>>> Thanks,
>>> Raymond
>>> --------------------------------------------------
>>> From: "Jean-Sebastien Delfino" <js...@apache.org>
>>> Sent: Wednesday, August 27, 2008 3:03 PM
>>> To: <us...@tuscany.apache.org>
>>> Subject: Re: How to build a Tuscany OSGi environment?
>>>
>>> Seems like we keep going around my question :) some comments inline.
>>>>
>>>> Raymond Feng wrote:
>>>>
>>>>> There are a few options on the table now:
>>>>>
>>>>> 1) Unzip one of the binary distros from Tuscany into TUSCANY_HOME
>>>>>
>>>>
>>>> AFAIK no Tuscany distro includes node-launcher-osgi at the moment, so
>>>> 'Unzip one of the binary distros' is not getting me very far.
>>>>
>>>>
>>>>> 2) Use maven dependency plugin to copy project dependencies to
>>>>> TUSCANY_HOME (see the node-launcher-osgi/pom.xml).
>>>>>
>>>>
>>>> Did that, I get that list of JARs:
>>>> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
>>>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>>>> org.osgi.core-1.0.1.jar
>>>> org.osgi.compendium-1.0.1.jar
>>>> org.osgi.foundation-1.0.0.jar
>>>> org.apache.felix.framework-1.0.4.jar
>>>>
>>>> PS: If you use our tuscany-maven-osgi-junit plugin, it will create the
>>>>> bundles automatically from the maven dependency list.
>>>>>
>>>>
>>>> Sorry, I'm having trouble understanding what that means. Aren't the
>>>> Tuscany JARs OSGi bundles already?
>>>>
>>>> We don't have a very good story yet. Any ideas are welcome.
>>>>>
>>>>
>>>> I know, I'm trying to help with ideas too, but to help I need answers to
>>>> my simple questions :) I'm going to try to ask my question again
>>>> differently, hoping it works this time.
>>>>
>>>> 1) Is this list of JARs:
>>>> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
>>>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>>>> org.osgi.core-1.0.1.jar
>>>> org.osgi.compendium-1.0.1.jar
>>>> org.osgi.foundation-1.0.0.jar
>>>> org.apache.felix.framework-1.0.4.jar
>>>>
>>>> the minimum set of JARs needed to an OSGi-enabled Tuscany node / Felix?
>>>>
>>>> 2) What is the equivalent list of JARs for Equinox?
>>>>
>>>> --
>>>> Jean-Sebastien
>>>>
>>>
>>>
>> OK Thanks, I'd like to simplify a bit and not require the
>> -Djava.ext.dirs=.\tuscany\launcher part. I'll look into the launcher code to
>> see if that can be done.
>>
>> I'll add tuscany-extensibility-osgi to the test distro too.
>>
>> Question (2) remains: What is the equivalent list of JARs for Equinox?
>>
>> Any idea?
>> --
>> Jean-Sebastien
>>
>
>

Re: How to build a Tuscany OSGi environment?

Posted by Raymond Feng <en...@gmail.com>.
Hi,

I just added a new module node-launcher-equinox to launch SCA Node using 
Equinox. It requires:

tuscany-node-launcher-equinox-1.4-SNAPSHOT.jar
app-1.0.0-v20070423.jar
common-3.3.0-v20070426.jar
contenttype-3.2.100-v20070319.jar
jobs-3.3.0-v20070423.jar
osgi-3.3.0-v20070530.jar
preferences-3.2.100-v20070522.jar
registry-3.3.0-v20070522.jar
runtime-3.3.100-v20070530.jar

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Wednesday, August 27, 2008 5:43 PM
To: <us...@tuscany.apache.org>
Subject: Re: How to build a Tuscany OSGi environment?

> Raymond Feng wrote:
>> I see two lists here:
>>
>> 1) A list of jars required to run the node-launcher-osgi (assuming it's 
>> under tuscany\launcher)
>>
>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>> org.apache.felix.framework-1.0.4.jar
>> org.osgi.compendium-1.0.1.jar
>> org.osgi.core-1.0.1.jar
>> org.osgi.foundation-1.0.0.jar
>> servlet-api-2.5.jar
>>
>> 2) A list of OSGi bundles required to start a SCA node (assuming it's 
>> under tuscany\modules or tuscany\lib)
>>
>> This varies depending on what extensions are required. This can be one of 
>> the distros +  tuscany-extensibility-osgi-1.4-SNAPSHOT.jar (if not added 
>> to the distro)
>>
>> Then we could run the following command:
>> java -Djava.ext.dirs=.\tuscany\launcher -DTUSCANY_HOME=.\tuscany -jar 
>> .\tuscany\launcher\tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar ...
>>
>> Thanks,
>> Raymond
>> --------------------------------------------------
>> From: "Jean-Sebastien Delfino" <js...@apache.org>
>> Sent: Wednesday, August 27, 2008 3:03 PM
>> To: <us...@tuscany.apache.org>
>> Subject: Re: How to build a Tuscany OSGi environment?
>>
>>> Seems like we keep going around my question :) some comments inline.
>>>
>>> Raymond Feng wrote:
>>>> There are a few options on the table now:
>>>>
>>>> 1) Unzip one of the binary distros from Tuscany into TUSCANY_HOME
>>>
>>> AFAIK no Tuscany distro includes node-launcher-osgi at the moment, so 
>>> 'Unzip one of the binary distros' is not getting me very far.
>>>
>>>>
>>>> 2) Use maven dependency plugin to copy project dependencies to 
>>>> TUSCANY_HOME (see the node-launcher-osgi/pom.xml).
>>>
>>> Did that, I get that list of JARs:
>>> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
>>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>>> org.osgi.core-1.0.1.jar
>>> org.osgi.compendium-1.0.1.jar
>>> org.osgi.foundation-1.0.0.jar
>>> org.apache.felix.framework-1.0.4.jar
>>>
>>>> PS: If you use our tuscany-maven-osgi-junit plugin, it will create the 
>>>> bundles automatically from the maven dependency list.
>>>
>>> Sorry, I'm having trouble understanding what that means. Aren't the 
>>> Tuscany JARs OSGi bundles already?
>>>
>>>> We don't have a very good story yet. Any ideas are welcome.
>>>
>>> I know, I'm trying to help with ideas too, but to help I need answers to 
>>> my simple questions :) I'm going to try to ask my question again 
>>> differently, hoping it works this time.
>>>
>>> 1) Is this list of JARs:
>>> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
>>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>>> org.osgi.core-1.0.1.jar
>>> org.osgi.compendium-1.0.1.jar
>>> org.osgi.foundation-1.0.0.jar
>>> org.apache.felix.framework-1.0.4.jar
>>>
>>> the minimum set of JARs needed to an OSGi-enabled Tuscany node / Felix?
>>>
>>> 2) What is the equivalent list of JARs for Equinox?
>>>
>>> -- 
>>> Jean-Sebastien
>>
>
> OK Thanks, I'd like to simplify a bit and not require 
> the -Djava.ext.dirs=.\tuscany\launcher part. I'll look into the launcher 
> code to see if that can be done.
>
> I'll add tuscany-extensibility-osgi to the test distro too.
>
> Question (2) remains: What is the equivalent list of JARs for Equinox?
>
> Any idea?
> -- 
> Jean-Sebastien 


Re: How to build a Tuscany OSGi environment?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> I see two lists here:
> 
> 1) A list of jars required to run the node-launcher-osgi (assuming it's 
> under tuscany\launcher)
> 
> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
> org.apache.felix.framework-1.0.4.jar
> org.osgi.compendium-1.0.1.jar
> org.osgi.core-1.0.1.jar
> org.osgi.foundation-1.0.0.jar
> servlet-api-2.5.jar
> 
> 2) A list of OSGi bundles required to start a SCA node (assuming it's 
> under tuscany\modules or tuscany\lib)
> 
> This varies depending on what extensions are required. This can be one 
> of the distros +  tuscany-extensibility-osgi-1.4-SNAPSHOT.jar (if not 
> added to the distro)
> 
> Then we could run the following command:
> java -Djava.ext.dirs=.\tuscany\launcher -DTUSCANY_HOME=.\tuscany -jar 
> .\tuscany\launcher\tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar ...
> 
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Jean-Sebastien Delfino" <js...@apache.org>
> Sent: Wednesday, August 27, 2008 3:03 PM
> To: <us...@tuscany.apache.org>
> Subject: Re: How to build a Tuscany OSGi environment?
> 
>> Seems like we keep going around my question :) some comments inline.
>>
>> Raymond Feng wrote:
>>> There are a few options on the table now:
>>>
>>> 1) Unzip one of the binary distros from Tuscany into TUSCANY_HOME
>>
>> AFAIK no Tuscany distro includes node-launcher-osgi at the moment, so 
>> 'Unzip one of the binary distros' is not getting me very far.
>>
>>>
>>> 2) Use maven dependency plugin to copy project dependencies to 
>>> TUSCANY_HOME (see the node-launcher-osgi/pom.xml).
>>
>> Did that, I get that list of JARs:
>> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>> org.osgi.core-1.0.1.jar
>> org.osgi.compendium-1.0.1.jar
>> org.osgi.foundation-1.0.0.jar
>> org.apache.felix.framework-1.0.4.jar
>>
>>> PS: If you use our tuscany-maven-osgi-junit plugin, it will create 
>>> the bundles automatically from the maven dependency list.
>>
>> Sorry, I'm having trouble understanding what that means. Aren't the 
>> Tuscany JARs OSGi bundles already?
>>
>>> We don't have a very good story yet. Any ideas are welcome.
>>
>> I know, I'm trying to help with ideas too, but to help I need answers 
>> to my simple questions :) I'm going to try to ask my question again 
>> differently, hoping it works this time.
>>
>> 1) Is this list of JARs:
>> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
>> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
>> org.osgi.core-1.0.1.jar
>> org.osgi.compendium-1.0.1.jar
>> org.osgi.foundation-1.0.0.jar
>> org.apache.felix.framework-1.0.4.jar
>>
>> the minimum set of JARs needed to an OSGi-enabled Tuscany node / Felix?
>>
>> 2) What is the equivalent list of JARs for Equinox?
>>
>> -- 
>> Jean-Sebastien 
> 

OK Thanks, I'd like to simplify a bit and not require the 
-Djava.ext.dirs=.\tuscany\launcher part. I'll look into the launcher 
code to see if that can be done.

I'll add tuscany-extensibility-osgi to the test distro too.

Question (2) remains: What is the equivalent list of JARs for Equinox?

Any idea?
-- 
Jean-Sebastien

Re: How to build a Tuscany OSGi environment?

Posted by Raymond Feng <en...@gmail.com>.
I see two lists here:

1) A list of jars required to run the node-launcher-osgi (assuming it's 
under tuscany\launcher)

tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
org.apache.felix.framework-1.0.4.jar
org.osgi.compendium-1.0.1.jar
org.osgi.core-1.0.1.jar
org.osgi.foundation-1.0.0.jar
servlet-api-2.5.jar

2) A list of OSGi bundles required to start a SCA node (assuming it's under 
tuscany\modules or tuscany\lib)

This varies depending on what extensions are required. This can be one of 
the distros +  tuscany-extensibility-osgi-1.4-SNAPSHOT.jar (if not added to 
the distro)

Then we could run the following command:
java -Djava.ext.dirs=.\tuscany\launcher -DTUSCANY_HOME=.\tuscany -jar 
.\tuscany\launcher\tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar ...

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Wednesday, August 27, 2008 3:03 PM
To: <us...@tuscany.apache.org>
Subject: Re: How to build a Tuscany OSGi environment?

> Seems like we keep going around my question :) some comments inline.
>
> Raymond Feng wrote:
>> There are a few options on the table now:
>>
>> 1) Unzip one of the binary distros from Tuscany into TUSCANY_HOME
>
> AFAIK no Tuscany distro includes node-launcher-osgi at the moment, so 
> 'Unzip one of the binary distros' is not getting me very far.
>
>>
>> 2) Use maven dependency plugin to copy project dependencies to 
>> TUSCANY_HOME (see the node-launcher-osgi/pom.xml).
>
> Did that, I get that list of JARs:
> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
> org.osgi.core-1.0.1.jar
> org.osgi.compendium-1.0.1.jar
> org.osgi.foundation-1.0.0.jar
> org.apache.felix.framework-1.0.4.jar
>
>> PS: If you use our tuscany-maven-osgi-junit plugin, it will create the 
>> bundles automatically from the maven dependency list.
>
> Sorry, I'm having trouble understanding what that means. Aren't the 
> Tuscany JARs OSGi bundles already?
>
>> We don't have a very good story yet. Any ideas are welcome.
>
> I know, I'm trying to help with ideas too, but to help I need answers to 
> my simple questions :) I'm going to try to ask my question again 
> differently, hoping it works this time.
>
> 1) Is this list of JARs:
> tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
> tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
> org.osgi.core-1.0.1.jar
> org.osgi.compendium-1.0.1.jar
> org.osgi.foundation-1.0.0.jar
> org.apache.felix.framework-1.0.4.jar
>
> the minimum set of JARs needed to an OSGi-enabled Tuscany node / Felix?
>
> 2) What is the equivalent list of JARs for Equinox?
>
> -- 
> Jean-Sebastien 


Re: How to build a Tuscany OSGi environment?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Seems like we keep going around my question :) some comments inline.

Raymond Feng wrote:
> There are a few options on the table now:
> 
> 1) Unzip one of the binary distros from Tuscany into TUSCANY_HOME

AFAIK no Tuscany distro includes node-launcher-osgi at the moment, so 
'Unzip one of the binary distros' is not getting me very far.

> 
> 2) Use maven dependency plugin to copy project dependencies to 
> TUSCANY_HOME (see the node-launcher-osgi/pom.xml).

Did that, I get that list of JARs:
tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
org.osgi.core-1.0.1.jar
org.osgi.compendium-1.0.1.jar
org.osgi.foundation-1.0.0.jar
org.apache.felix.framework-1.0.4.jar

> PS: If you use our tuscany-maven-osgi-junit plugin, it will create the 
> bundles automatically from the maven dependency list.

Sorry, I'm having trouble understanding what that means. Aren't the 
Tuscany JARs OSGi bundles already?

> We don't have a very good story yet. Any ideas are welcome.

I know, I'm trying to help with ideas too, but to help I need answers to 
my simple questions :) I'm going to try to ask my question again 
differently, hoping it works this time.

1) Is this list of JARs:
tuscany-extensibility-osgi-1.4-SNAPSHOT.jar
tuscany-node-launcher-osgi-1.4-SNAPSHOT.jar
org.osgi.core-1.0.1.jar
org.osgi.compendium-1.0.1.jar
org.osgi.foundation-1.0.0.jar
org.apache.felix.framework-1.0.4.jar

the minimum set of JARs needed to an OSGi-enabled Tuscany node / Felix?

2) What is the equivalent list of JARs for Equinox?

-- 
Jean-Sebastien

Re: How to build a Tuscany OSGi environment?

Posted by Raymond Feng <en...@gmail.com>.
There are a few options on the table now:

1) Unzip one of the binary distros from Tuscany into TUSCANY_HOME

2) Use maven dependency plugin to copy project dependencies to TUSCANY_HOME 
(see the node-launcher-osgi/pom.xml).

PS: If you use our tuscany-maven-osgi-junit plugin, it will create the 
bundles automatically from the maven dependency list.

3) Rajini recently added a module [1] which will produce a fat jar file 
which contains all the tuscany and 3rd party bundles on the dependency list. 
We might be able use it to produce an OSGi-enabled tuscany distro.

[1] 
https://svn.apache.org/repos/asf/tuscany/java/sca/itest/osgi-tuscany/tuscany-versioned

4) Explore the possibility to use the Eclipse Equinox run/debug profile to 
launch Tuscany inside OSGi.

We don't have a very good story yet. Any ideas are welcome.

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Wednesday, August 27, 2008 1:40 PM
To: <us...@tuscany.apache.org>
Subject: Re: How to build a Tuscany OSGi environment?

> Raymond Feng wrote:
>> Please see my comments inline.
>>
>> Thanks,
>> Raymond
>>
>> --------------------------------------------------
>> From: "Jean-Sebastien Delfino" <js...@apache.org>
>> Sent: Wednesday, August 27, 2008 10:38 AM
>> To: <us...@tuscany.apache.org>
>> Subject: How to build a Tuscany OSGi environment?
>>
>>> I'm trying to build a Tuscany environment that includes some of the 
>>> latest Tuscany OSGi integration.
>>>
>>> My use case is that I want Tuscany to bootstrap OSGi for me when I start 
>>> a Tuscany node, as it'll help the node load different levels of runtime 
>>> extension and dependency bundles. I want to start with Equinox for now 
>>> (I'll test with Felix later).
>>
>> We have both Equinox and Felix. Felix is better tested ATM.
>>
>>>
>>> I have some questions:
>>>
>>> What Tuscany modules do I need to add to my POM as dependencies?
>>
>> If you use tuscany-node-launcher-osgi to launch the node, you will need 
>> to have dependencies to compile your app (such as sca-api and node-api). 
>> The other tuscany and 3rd party runtime jars (bundles) will be discovered 
>> from TUSCANY_HOME and TUSCANY_PATH system properties or environment 
>> variables.
>
> Right, but before they get found under TUSCANY_HOME, somebody has to put 
> them there... I'm that guy at the moment, trying to copy the JARs under my 
> TUSCANY_HOME, and my question is: which JARs do I need to copy?
>
> -- 
> Jean-Sebastien 


Re: How to build a Tuscany OSGi environment?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Please see my comments inline.
> 
> Thanks,
> Raymond
> 
> --------------------------------------------------
> From: "Jean-Sebastien Delfino" <js...@apache.org>
> Sent: Wednesday, August 27, 2008 10:38 AM
> To: <us...@tuscany.apache.org>
> Subject: How to build a Tuscany OSGi environment?
> 
>> I'm trying to build a Tuscany environment that includes some of the 
>> latest Tuscany OSGi integration.
>>
>> My use case is that I want Tuscany to bootstrap OSGi for me when I 
>> start a Tuscany node, as it'll help the node load different levels of 
>> runtime extension and dependency bundles. I want to start with Equinox 
>> for now (I'll test with Felix later).
> 
> We have both Equinox and Felix. Felix is better tested ATM.
> 
>>
>> I have some questions:
>>
>> What Tuscany modules do I need to add to my POM as dependencies?
> 
> If you use tuscany-node-launcher-osgi to launch the node, you will need 
> to have dependencies to compile your app (such as sca-api and node-api). 
> The other tuscany and 3rd party runtime jars (bundles) will be 
> discovered from TUSCANY_HOME and TUSCANY_PATH system properties or 
> environment variables.

Right, but before they get found under TUSCANY_HOME, somebody has to put 
them there... I'm that guy at the moment, trying to copy the JARs under 
my TUSCANY_HOME, and my question is: which JARs do I need to copy?

-- 
Jean-Sebastien

Re: How to build a Tuscany OSGi environment?

Posted by Raymond Feng <en...@gmail.com>.
Please see my comments inline.

Thanks,
Raymond

--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Wednesday, August 27, 2008 10:38 AM
To: <us...@tuscany.apache.org>
Subject: How to build a Tuscany OSGi environment?

> I'm trying to build a Tuscany environment that includes some of the latest 
> Tuscany OSGi integration.
>
> My use case is that I want Tuscany to bootstrap OSGi for me when I start a 
> Tuscany node, as it'll help the node load different levels of runtime 
> extension and dependency bundles. I want to start with Equinox for now 
> (I'll test with Felix later).

We have both Equinox and Felix. Felix is better tested ATM.

>
> I have some questions:
>
> What Tuscany modules do I need to add to my POM as dependencies?

If you use tuscany-node-launcher-osgi to launch the node, you will need to 
have dependencies to compile your app (such as sca-api and node-api). The 
other tuscany and 3rd party runtime jars (bundles) will be discovered from 
TUSCANY_HOME and TUSCANY_PATH system properties or environment variables.

>
> What's the difference between modules extensibility-osgi and 
> extensibility-equinox?

extensibility-osgi use the OSGi bundles to discover tuscany runtime 
extensions/extension points using the META-INF/services pattern. 
extensibility-equinox is added as a place holder to support Eclipse 
plugin.xml based extension/extension point registry. So far it's still 
pretty much the same as extensibility-osgi.

>
> What are these two modules responsible for?
>
> node-launcher-osgi has a compile dependency on Felix, can this dependency 
> be pushed to another module?

I'm struggling a bit here on where we should provide the pluggability for 
OSGi runtimes such as Equinox or Felix. There are a few options:

1) Have different OSGi launchers for Felix and Equinox 
(tuscany-node-launcher-osgi uses Felix at this point)

2) Define a SPI to discover OSGi runtimes based on the service discovery 
pattern (maybe go into the extensibility-osgi, but it's kind of chicken-egg 
issue. The full tuscany runtime service discovery will only be available 
once the tuscany runtime is bootstrapped into the OSGi).

3) Use brute-force to see which OSGi runtime is on the classpath (See 
tuscany-osgi-runtime module)

>
> Shouldn't the dependencies on the OSGi JARs in node-launcher-osgi have 
> scope 'provided' instead of 'compile'?
>

It could be. What would be the user experience to use the launcher? If we 
use a command line to launch the OSGi node. Then the less jars are required 
for the launcher, the better. Maybe we should have a "launcher" folder under 
TUSCANY_HOME to contain a small set of jars for the purpose of launching.

> Thanks
> -- 
> Jean-Sebastien 


Re: How to build a Tuscany OSGi environment?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Jean-Sebastien Delfino wrote:
> I'm trying to build a Tuscany environment that includes some of the 
> latest Tuscany OSGi integration.
> 
> My use case is that I want Tuscany to bootstrap OSGi for me when I start 
> a Tuscany node, as it'll help the node load different levels of runtime 
> extension and dependency bundles. I want to start with Equinox for now 
> (I'll test with Felix later).
> 
> I have some questions:
> 
> What Tuscany modules do I need to add to my POM as dependencies?
> 
> What's the difference between modules extensibility-osgi and 
> extensibility-equinox?
> 
> What are these two modules responsible for?
> 
> node-launcher-osgi has a compile dependency on Felix, can this 
> dependency be pushed to another module?
> 
> Shouldn't the dependencies on the OSGi JARs in node-launcher-osgi have 
> scope 'provided' instead of 'compile'?
> 
> Thanks

In SVN r689576 I've started to add some of the OSGi modules to a distro 
build to enable some testing. I still have the above questions though.

-- 
Jean-Sebastien