Return-Path: X-Original-To: apmail-tuscany-user-archive@www.apache.org Delivered-To: apmail-tuscany-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02FD497E2 for ; Tue, 8 Nov 2011 15:54:40 +0000 (UTC) Received: (qmail 61655 invoked by uid 500); 8 Nov 2011 15:54:39 -0000 Delivered-To: apmail-tuscany-user-archive@tuscany.apache.org Received: (qmail 61597 invoked by uid 500); 8 Nov 2011 15:54:39 -0000 Mailing-List: contact user-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@tuscany.apache.org Delivered-To: mailing list user@tuscany.apache.org Received: (qmail 61590 invoked by uid 99); 8 Nov 2011 15:54:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 15:54:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simonslaws@googlemail.com designates 209.85.215.181 as permitted sender) Received: from [209.85.215.181] (HELO mail-ey0-f181.google.com) (209.85.215.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 15:54:33 +0000 Received: by eyx24 with SMTP id 24so630866eyx.26 for ; Tue, 08 Nov 2011 07:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Cl+EA8q1umi4BP0EBfxfE9YVCerlbivM53BJgRVKJYM=; b=dUGhtdkeYkh9VbZ8ErR7b0uTPFid/SPQy5pLDwtopP9vB19IMSaM9sJFmANvujdBqy LgEvbcdGomlcdP/FVSqUhGf1cCSVG0dEBB/GiBjLzj6KGFwpHFS6o7bHHznyJLZQ4/f6 PxRxxN/4l+uxFv97tRTcDlh9gOTdUl368+ti8= MIME-Version: 1.0 Received: by 10.182.31.15 with SMTP id w15mr10190787obh.7.1320767652279; Tue, 08 Nov 2011 07:54:12 -0800 (PST) Received: by 10.182.11.105 with HTTP; Tue, 8 Nov 2011 07:54:12 -0800 (PST) In-Reply-To: References: Date: Tue, 8 Nov 2011 15:54:12 +0000 Message-ID: Subject: Re: Tuscany and OSgi with ActiveMQ From: Simon Laws To: user@tuscany.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Nov 5, 2011 at 11:02 PM, Matt Madhavan wro= te: > Hi Simon, > When you get a moment could you please send me a sample of activeMQ/SCA. = I > would like to send a message in one queue and receive the reply in a > different queue. > I know you are really busy but any help will be appreciated. > Thanks > Matt > > On Tue, Nov 1, 2011 at 2:03 PM, Matt Madhavan > wrote: >> >> HI Simon, >> Thanks for the reply. I'm off today but I will to through the artifacts >> you sent. Looks like my time will open up soon in couple of weeks. I'll = use >> this time to learn the SCA more and may be help you write a Tuscany Exte= nder >> Bundle. >> Meanwhile I would =A0recommend you to use Apache Karaf (you can go from >> Equinox to Felix seamlessly! ) for your OSGi testing. The diagnostics ar= e >> just awesome. I can give you a hand with it if you have any issues. >> I have been using less than 3 months and love it. I used to use both >> Equinox and Felix stand alone. But Karaf is awesome. >> I have already been invited to be a commiter of Karaf by the Karaf team! >> Never done any thing like this =A0- =A0just a little nervous! But gonna = do it. >> Thanks >> Matt >> >> >> >> On Tue, Nov 1, 2011 at 12:44 PM, Simon Laws >> wrote: >>> >>> Hi Matt >>> >>> Comments in-line >>> >>> Simon >>> >>> On Mon, Oct 31, 2011 at 9:15 PM, Matt Madhavan >>> 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/t= arget/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 >>> (http://people.apache.org/~slaws/apache-tuscany-sca-all-2.0-SNAPSHOT.zi= p) >>> 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 o= n >>> > 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 th= at >>> > 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 >>> >>> http://tuscany.apache.org/documentation-2x/running-tuscany-sca-2x-with-= equinox-and-felix.html >>> >>> > 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 activato= r! >>> > as >>> > follows: >>> > =A0 =A0 =A0 =A0 Node node =3D 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 >>> > wrote: >>> >> >>> >> On Sat, Oct 29, 2011 at 1:05 AM, Matt Madhavan >>> >> >>> >> 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 ----> =A0SCA 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 t= he >>> >> 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 provi= de >>> >> 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 >> > > Hi Matt I eventually got to fixing the sample. There are two bundle projects [1][2]= . The first (jms-osgi) exposes the bundle using and SCA composite with implementation.osgi as the component implementation type. The service of this particular component is exposed over binding.jms The second bundle (jms-osgi-client) is a non-SCA bundle that just pushes a message into a JMS queue at activation. This sample is the simplest I could have made it but not necessarily the best approach. For example. it depends on Tuscany default binding.jms behaviour which is unlikely to be what you want and the client just does native JMS stuff which again I would really replace with an SCA reference. But difficult to know precisely what you need. So take a look. Re. other binding.jms example and configurations. Take a look at out JMS related tests [3]. [1] http://svn.apache.org/repos/asf/tuscany/sandbox/slaws/jms-osgi/jms-osgi= / [2] http://svn.apache.org/repos/asf/tuscany/sandbox/slaws/jms-osgi/jms-osgi= -client/ [3] http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/testing/ites= t/jms/ Hope that helps Simon --=20 Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com