You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Matt Madhavan <ma...@gmail.com> on 2011/10/10 23:06:43 UTC

OSGI/SCA/Tuscany/ActiveMQ bindings

Hello,
Has any one point me to an OSGi/SCA/ActiveMQ binding example? has any one
done it? I'm looking to invoke an OSGi call upon receiving a msg from
activemq.

Thanks in advance!

Matt

Re: OSGI/SCA/Tuscany/ActiveMQ bindings

Posted by Simon Laws <si...@googlemail.com>.
> Is there an OSGI'fied Tuscany bundles (not stand alone) that I can deploy to
> KARAF/FELIX?
>
...snip

Yes, but you'll need a recent build, e.g. [1]. I've just noticed a few
manifest problems which I have fixes for so they may cause problems
haven't had chance to try yet. For brute force instructions on how to
install everything into OSGi look at
samples/running-tuscany/osgi/README.html. Activation will be a
problem. We do have code that listens for bundle activations but I'm
not sure what state it's in would have to try it. When I used it most
recently I wrote a bundle activator to start the runtime.

Hope that helps.

Simon

[1] https://builds.apache.org/job/Tuscany-2x/ws/sca-2x/distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT.zip
[2] http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/samples/learning-more/contribution-osgi/src/main/java/calculator/CalculatorActivator.java

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: OSGI/SCA/Tuscany/ActiveMQ bindings

Posted by Matt Madhavan <ma...@gmail.com>.
Hi Simon,
The Tuscany runtime should be running in KAraf. it does not have to support
EBA.

Is there an OSGI'fied Tuscany bundles (not stand alone) that I can deploy to
KARAF/FELIX? I have now activemq running now in  KARAF.

If I can run invoke a service (OSGi) upon sending a messgse to a queue and
read the result and reply back in the queue it will be great!

Thanks
Matt


On Wed, Oct 12, 2011 at 10:20 AM, Simon Laws <si...@googlemail.com>wrote:

> On Wed, Oct 12, 2011 at 3:19 PM, Matt Madhavan <ma...@gmail.com>
> wrote:
> > Hi Simon,
> > Any ideas? The snippet below is the one used for our test Websphere
> server.
> > I'm looking for the equivalant functionality with Tuscany and anctivemq.
> > Thanks
> > Matt
> >
> > On Tue, Oct 11, 2011 at 4:17 PM, Matt Madhavan <ma...@gmail.com>
> > wrote:
> >>
> >> Hi Simon,
> >> The following is the our scenario. Please let me have any examples or
> >> documentation regarding this?
> >> ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
> >> implementation.osgi ---> your component as an OSGi bundle?
> >>
> >> This our Test SCA....
> >>
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> >> xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
> >> xmlns:was="http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06"
> >> autowire="false" name="TestHarnessComposite"
> >> targetNamespace="http://com.xxxx.xxxx.bd.externalview">
> >>   <component name="TestHarnessComponent">
> >>     <was:implementation.osgiapp
> >> applicationSymbolicName="com.xxxx.xxxx.bd.eba"
> >> applicationVersion="1.0.0.M1-SNAPSHOT"/>
> >>     <service name="BDTestHarnessService" requires="exactlyOnce">
> >>       <binding.jms name="Objectmessage">
> >>         <destination name="jms/bdrequestthqueue" type="queue"/>
> >>         <activationSpec create="never"
> >> name="jms/bdtestharnessactivationspecification"/>
> >>         <response>
> >>           <destination name="jms/bdresponsethqueue" type="queue"/>
> >>           <connectionFactory name="jms/bd.qcf.02"/>
> >>         </response>
> >>         <tuscany:wireFormat.jmsObject/>
> >>       </binding.jms>
> >>     </service>
> >>   </component>
> >> </composite>
> >> On Tue, Oct 11, 2011 at 10:24 AM, Simon Laws <simonslaws@googlemail.com
> >
> >> wrote:
> >>>
>
> Hi Matt
>
> We don't actually support EBAs as component implementations in Tuscany
> yet. We do support vanilla OSGi bundles but that won't read the EBA
> meta-data. I assume that will break you?
>
> I haven't used our vanilla OSGi support for a while but could see if I
> can find examples later  (they were pulled out of the build a while
> back so may need a bit of tidying).
>
> Simon
>

Re: OSGI/SCA/Tuscany/ActiveMQ bindings

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Oct 12, 2011 at 3:19 PM, Matt Madhavan <ma...@gmail.com> wrote:
> Hi Simon,
> Any ideas? The snippet below is the one used for our test Websphere server.
> I'm looking for the equivalant functionality with Tuscany and anctivemq.
> Thanks
> Matt
>
> On Tue, Oct 11, 2011 at 4:17 PM, Matt Madhavan <ma...@gmail.com>
> wrote:
>>
>> Hi Simon,
>> The following is the our scenario. Please let me have any examples or
>> documentation regarding this?
>> ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
>> implementation.osgi ---> your component as an OSGi bundle?
>>
>> This our Test SCA....
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>> xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
>> xmlns:was="http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06"
>> autowire="false" name="TestHarnessComposite"
>> targetNamespace="http://com.xxxx.xxxx.bd.externalview">
>>   <component name="TestHarnessComponent">
>>     <was:implementation.osgiapp
>> applicationSymbolicName="com.xxxx.xxxx.bd.eba"
>> applicationVersion="1.0.0.M1-SNAPSHOT"/>
>>     <service name="BDTestHarnessService" requires="exactlyOnce">
>>       <binding.jms name="Objectmessage">
>>         <destination name="jms/bdrequestthqueue" type="queue"/>
>>         <activationSpec create="never"
>> name="jms/bdtestharnessactivationspecification"/>
>>         <response>
>>           <destination name="jms/bdresponsethqueue" type="queue"/>
>>           <connectionFactory name="jms/bd.qcf.02"/>
>>         </response>
>>         <tuscany:wireFormat.jmsObject/>
>>       </binding.jms>
>>     </service>
>>   </component>
>> </composite>
>> On Tue, Oct 11, 2011 at 10:24 AM, Simon Laws <si...@googlemail.com>
>> wrote:
>>>

Hi Matt

We don't actually support EBAs as component implementations in Tuscany
yet. We do support vanilla OSGi bundles but that won't read the EBA
meta-data. I assume that will break you?

I haven't used our vanilla OSGi support for a while but could see if I
can find examples later  (they were pulled out of the build a while
back so may need a bit of tidying).

Simon

Re: OSGI/SCA/Tuscany/ActiveMQ bindings

Posted by Matt Madhavan <ma...@gmail.com>.
Hi Simon,
Any ideas? The snippet below is the one used for our test Websphere server.
I'm looking for the equivalant functionality with Tuscany and anctivemq.

Thanks
Matt


On Tue, Oct 11, 2011 at 4:17 PM, Matt Madhavan <ma...@gmail.com>wrote:

> Hi Simon,
> The following is the our scenario. Please let me have any examples or
> documentation regarding this?
>
> ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
> implementation.osgi ---> your component as an OSGi bundle?
>
>
> This our Test SCA....
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="
> http://tuscany.apache.org/xmlns/sca/1.0" xmlns:was="
> http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06" autowire="false"
> name="TestHarnessComposite" targetNamespace="
> http://com.xxxx.xxxx.bd.externalview">
>   <component name="TestHarnessComponent">
>     <was:implementation.osgiapp
> applicationSymbolicName="com.xxxx.xxxx.bd.eba"
> applicationVersion="1.0.0.M1-SNAPSHOT"/>
>     <service name="BDTestHarnessService" requires="exactlyOnce">
>       <binding.jms name="Objectmessage">
>         <destination name="jms/bdrequestthqueue" type="queue"/>
>         <activationSpec create="never"
> name="jms/bdtestharnessactivationspecification"/>
>         <response>
>           <destination name="jms/bdresponsethqueue" type="queue"/>
>           <connectionFactory name="jms/bd.qcf.02"/>
>         </response>
>         <tuscany:wireFormat.jmsObject/>
>       </binding.jms>
>     </service>
>   </component>
> </composite>
>
> On Tue, Oct 11, 2011 at 10:24 AM, Simon Laws <si...@googlemail.com>wrote:
>
>> On Mon, Oct 10, 2011 at 10:06 PM, Matt Madhavan <ma...@gmail.com>
>> wrote:
>> > Hello,
>> > Has any one point me to an OSGi/SCA/ActiveMQ binding example? has any
>> one
>> > done it? I'm looking to invoke an OSGi call upon receiving a msg from
>> > activemq.
>> > Thanks in advance!
>> > Matt
>>
>> Hi Matt
>>
>> I'm not sure we have a specific example but the runtime is designed to
>> work in an OSGi environment and with OSGi bundles. Tell me a bit more
>> about the scenario as it's not clear how you intend to implement your
>> component. Is it...
>>
>> ActiveMQ ----> OSGi container (Felix/Equinox) ----> SCA container
>> (Tuscany) ---> binding.jms ---> implementation.java ---> your
>> component as a Java class.
>>
>> OR
>>
>> ActiveMQ ----> OSGi container (Felix/Equinox) ----> SCA container
>> (Tuscany) ---> binding.jms ---> implementation.osgi ---> your
>> component as an OSGi bundle?
>>
>> OR
>>
>> ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
>> implementation.osgi ---> your component as an OSGi bundle?
>>
>> OR
>>
>> something else?
>>
>> Regards
>>
>> Simon
>>
>> --
>> Apache Tuscany committer: tuscany.apache.org
>> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>>
>
>

Re: OSGI/SCA/Tuscany/ActiveMQ bindings

Posted by Matt Madhavan <ma...@gmail.com>.
Hi Simon,
The following is the our scenario. Please let me have any examples or
documentation regarding this?

ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
implementation.osgi ---> your component as an OSGi bundle?


This our Test SCA....



<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="
http://tuscany.apache.org/xmlns/sca/1.0" xmlns:was="
http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06" autowire="false"
name="TestHarnessComposite" targetNamespace="
http://com.xxxx.xxxx.bd.externalview">
  <component name="TestHarnessComponent">
    <was:implementation.osgiapp
applicationSymbolicName="com.xxxx.xxxx.bd.eba"
applicationVersion="1.0.0.M1-SNAPSHOT"/>
    <service name="BDTestHarnessService" requires="exactlyOnce">
      <binding.jms name="Objectmessage">
        <destination name="jms/bdrequestthqueue" type="queue"/>
        <activationSpec create="never"
name="jms/bdtestharnessactivationspecification"/>
        <response>
          <destination name="jms/bdresponsethqueue" type="queue"/>
          <connectionFactory name="jms/bd.qcf.02"/>
        </response>
        <tuscany:wireFormat.jmsObject/>
      </binding.jms>
    </service>
  </component>
</composite>

On Tue, Oct 11, 2011 at 10:24 AM, Simon Laws <si...@googlemail.com>wrote:

> On Mon, Oct 10, 2011 at 10:06 PM, Matt Madhavan <ma...@gmail.com>
> wrote:
> > Hello,
> > Has any one point me to an OSGi/SCA/ActiveMQ binding example? has any one
> > done it? I'm looking to invoke an OSGi call upon receiving a msg from
> > activemq.
> > Thanks in advance!
> > Matt
>
> Hi Matt
>
> I'm not sure we have a specific example but the runtime is designed to
> work in an OSGi environment and with OSGi bundles. Tell me a bit more
> about the scenario as it's not clear how you intend to implement your
> component. Is it...
>
> ActiveMQ ----> OSGi container (Felix/Equinox) ----> SCA container
> (Tuscany) ---> binding.jms ---> implementation.java ---> your
> component as a Java class.
>
> OR
>
> ActiveMQ ----> OSGi container (Felix/Equinox) ----> SCA container
> (Tuscany) ---> binding.jms ---> implementation.osgi ---> your
> component as an OSGi bundle?
>
> OR
>
> ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
> implementation.osgi ---> your component as an OSGi bundle?
>
> OR
>
> something else?
>
> Regards
>
> Simon
>
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

Re: OSGI/SCA/Tuscany/ActiveMQ bindings

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Oct 10, 2011 at 10:06 PM, Matt Madhavan <ma...@gmail.com> wrote:
> Hello,
> Has any one point me to an OSGi/SCA/ActiveMQ binding example? has any one
> done it? I'm looking to invoke an OSGi call upon receiving a msg from
> activemq.
> Thanks in advance!
> Matt

Hi Matt

I'm not sure we have a specific example but the runtime is designed to
work in an OSGi environment and with OSGi bundles. Tell me a bit more
about the scenario as it's not clear how you intend to implement your
component. Is it...

ActiveMQ ----> OSGi container (Felix/Equinox) ----> SCA container
(Tuscany) ---> binding.jms ---> implementation.java ---> your
component as a Java class.

OR

ActiveMQ ----> OSGi container (Felix/Equinox) ----> SCA container
(Tuscany) ---> binding.jms ---> implementation.osgi ---> your
component as an OSGi bundle?

OR

ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
implementation.osgi ---> your component as an OSGi bundle?

OR

something else?

Regards

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com