tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Laws <simonsl...@googlemail.com>
Subject Re: Tuscany and OSgi with ActiveMQ
Date Tue, 01 Nov 2011 17:44:23 GMT
Hi Matt

Comments in-line


On Mon, Oct 31, 2011 at 9:15 PM, Matt Madhavan <mattmadhavan@gmail.com> wrote:
> Hi Simon,
> Thank you very much for the reply! I really appreciate it!
> For some reason I'm not able to access the following URL!
> https://builds.apache.org/job/Tuscany-2x/ws/sca-2x/distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT.zip

Hmmm, strange. Works for me. Maybe it's a firewall thing.

> Could you please check the link? Also feel free to email me the zip. I'm
> still a little confused.

I put the latest on here
hope that works for you.

> All I'm trying to do is when an message is sent to a JMS queue I want a
> method invoked in my target class which is inside a bundle (onMessage may
> be) and then when the onMessage returns a value the value gets sent on a
> different queue). Can I have an example for this please and I'll greatly
> appreciate it!

Yep, am trying to fix the sample I created to demonstrate this.

> I have following questions!
> Is the Tuscany runtime an OSGi bundle already? I'm using Karaf. In that case
> I can just deploy the runtime to the deploy folder.

The Tuscany runtime is a whole set of bundles and dependencies.
There's an equinox config.ini that makes it easy to load them all into
equinox. For Felix there are some instructions here

> Looks like you are are running the composite at the time of bundle
> activation. I think an ideal solution would be to create an Tuncany OSGi
> Extender bundle that will (like rest of the extender bundles) :
> 1. Listen to other bundles' lifecycle
> 2. When the start introspect them to see if they are Tuscany Bundles (look
> in to the META-INF folder for Tuscany info)
> 3, If they are do the same thing you are doing in the bundle activator! as
> follows:
>         Node node = TuscanyRuntime.runComposite("Calculator.composite",
> context.getBundle().getLocation());
> I may be tempted to write an Extender bundle but rt now I'm really pressed
> for time. So if you could get me past this I'll help or write an extender a
> bundle my self!

I agree it would be better to have a more automatic way of launching
the composites. I think there is some code to do this but I've not
exercised it in a while so I wanted to do the thing I was more
confident would work in the first instance. Having said that I haven't
quite got it to work yet.

> Thanks in advance!
> Matt
> BTW:
> I just picked up a copy of your book and learning a lot about SCA as well!
> Thanks.
> On Mon, Oct 31, 2011 at 7:52 AM, Simon Laws <simonslaws@googlemail.com>
> wrote:
>> On Sat, Oct 29, 2011 at 1:05 AM, Matt Madhavan <mattmadhavan@gmail.com>
>> wrote:
>> > Hello,
>> > A while ago I had posted this req.
>> >
>> > Hello,
>> > I'm in urgent need for an example/documentation for the following
>> > scenario.
>> > Can some one point me to the right direction please?
>> >
>> > ActiveMQ ---->  SCA container (Tuscany) ---> binding.jms --->
>> > implementation.osgi ---> your component as an OSGi bundle?
>> >
>> >
>> > This our Test SCA. running on WAS. I want to replicate this same using
>> > ActiveMQ/Tuscany in Karaf (Apache Felix OSGi runtime underneath)
>> >
>> > Any help will be appreciated!
>> >
>> > Thanks in advance!
>> >
>> > Matt
>> >
>> > Can some one point me to the right direction please? I would like to see
>> > some examples. Since I could not get it to work last time I had to use
>> > Apache Camel for my demo! Now I'm back to SCA!
>> >
>> > Any help will be appreciated!
>> >
>> > Thanks
>> > Matt
>> >
>> >
>> >
>> >
>> Hi Matt
>> I started putting a simple sample together [1]. This doesn't include
>> implementation.osgi yet but I'm seeing some SAX parser issue so need
>> to fix that first.
>> Current this is just a bundle which is a contribution in it's own
>> right. The bundle activator starts the Tuscany runtime which loads the
>> contribution and runs a simple test. I've adjusted the test to use
>> binding.jms.
>> I should point out that implementation.osgi in Tuscany doesn't provide
>> support for Aries style EBAs at the moment.
>> [1] http://svn.apache.org/repos/asf/tuscany/sandbox/slaws/jms-osgi/
>> Regards
>> Simon
>> --
>> Apache Tuscany committer: tuscany.apache.org
>> Co-author of a book about Tuscany and SCA: tuscanyinaction.com

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

View raw message