Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6252944F3 for ; Tue, 21 Jun 2011 18:59:26 +0000 (UTC) Received: (qmail 57182 invoked by uid 500); 21 Jun 2011 18:59:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 57140 invoked by uid 500); 21 Jun 2011 18:59:26 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 57132 invoked by uid 99); 21 Jun 2011 18:59:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 18:59:26 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [72.248.107.195] (HELO mail.cra.com) (72.248.107.195) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 18:59:21 +0000 Received: from SERVER02.cra.lan ([::1]) by SERVER02.cra.lan ([::1]) with mapi; Tue, 21 Jun 2011 14:58:58 -0400 From: Michael Furtak To: "users@camel.apache.org" Content-Class: urn:content-classes:message Date: Tue, 21 Jun 2011 14:58:56 -0400 Subject: RE: Camel under OSGi without Spring et al. Thread-Topic: Camel under OSGi without Spring et al. Thread-Index: AcwwI+K4bH5nmg6FS7eYQzebEgEoGAAINSXw Message-ID: <387333E9F118A9429BD1AEAFF6DE644A1CBDC07902@SERVER02.cra.lan> References: <387333E9F118A9429BD1AEAFF6DE644A1CBDC074D0@SERVER02.cra.lan><387333E9F118A9429BD1AEAFF6DE644A1CBDC07521@SERVER02.cra.lan><387333E9F118A9429BD1AEAFF6DE644A1CBDC07636@SERVER02.cra.lan> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi Gert, I'm clearly only one user (and a seriously new one, at that), but you've ca= ptured exactly how I would like to use Camel. If I can provide use/test cas= es, or feedback about my limited environment I'd be happy to do so. Thanks, -Mike THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED.= IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FRO= M DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, y= our use of this message for any purpose is strictly prohibited. If you have= received this communication in error, please delete the message and notify= the sender so that we may correct our records. -----Original Message----- From: Gert Vanthienen [mailto:gert.vanthienen@gmail.com] Sent: Tuesday, June 21, 2011 10:59 AM To: users@camel.apache.org Subject: Re: Camel under OSGi without Spring et al. L.S., I think adding support for pure OSGi deployments (no blueprint, spring, ...) might be an interesting addition to Camel as such. It's probably not that useful in the environment we typically have in mind (ESB, enterprise applications, ...) but for other use cases it may make perfect sense to be able to have a more lightweight approach available as well. Not entirely sure what the current OsgiCamelTracker is doing, but we could e.g. (just guessing what would be useful here, so feel free to amend/comment/...) build something that tracks RouteBuilder instances in the OSGi Service Registry and then creates CamelContexts to run those, with a service property to allow configuring the CamelContext instance to add the routes to? Regards, Gert Vanthienen ------------------------ FuseSource Web: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ On Tue, Jun 21, 2011 at 4:38 PM, Donald Whytock wrote: > Odd...I can see it there. I'll send it to you directly. > > Don > > On Tue, Jun 21, 2011 at 8:01 AM, Michael Furtak wrote: >> Hi Don, >> >> I wasn't able to find OsgiCamelTracker.java attached to your message. >> >> Thanks, >> -Mike >> >> >> >> >> >> >> >> THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESS= ED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT = FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient= , your use of this message for any purpose is strictly prohibited. If you h= ave received this communication in error, please delete the message and not= ify the sender so that we may correct our records. >> >> -----Original Message----- >> >> >> >> From: Donald Whytock [mailto:dwhytock@gmail.com] >> Sent: Monday, June 20, 2011 4:45 PM >> To: users@camel.apache.org >> Subject: Re: Camel under OSGi without Spring et al. >> >> OsgiCamelTracker.java (attached) is a work in progress. There's a >> reference to ContextUtil; that's the service class that supplies the >> CamelContext singleton. >> >> Use it by subclassing it and implementing methods start() and stop(). >> Call setBundleContext(bundleContext) first, then startTracking(). >> >> OsgiCamelTracker.startTracking() accepts no parameters, a single >> String, or a Collection. The strings are the names of >> components that you need. It'll track instances of ComponentResolver, >> maintaining a list of what components are available and what >> components are still needed. When all the components you need are >> available, it'll call start(); when any of the components cease to be >> available, it'll call stop(). >> >> If you don't supply component names, it'll react to camel-core itself >> becoming active, which is all you need for core components like mock, >> bean and file. >> >> Use routeId() in your route definitions. Use >> camelcontext.startRoute() from the OsgiCamelTracker.start(); use >> camelcontext.stopRoute() from the OsgiCamelTracker.stop(). >> >> Be advised, you'll need to use a singleton CamelContext if you're >> using SEDA queues, because SEDA queues are local to a CamelContext >> instance. A route that consumes from a SEDA queue from one >> CamelContext instance won't see anything produced to a SEDA queue from >> a different CamelContext instance. >> >> For OsgiDefaultCamelContext... >> >>> On Mon, Jun 20, 2011 at 3:31 PM, Michael Furtak wrote= : >>>> I did come across mention of this in my troubleshooting exploration. I= t seems to be part of a bundle called camel-core-osgi, is that right? I don= 't think I have it in my 2.7.2 distribution. Is it something I need to bund= le myself? I also saw mention of it being private to the Spring bundle, whi= ch is what prompted my discussion about not wanting to bring in Spring. >> >> org.apache.camel.core.osgi is in camel-blueprint.jar. I split it out >> into its own .jar so as to not worry about the Blueprint dependencies. >> You'll need to modify the manifest, or make your own. >> >> Don >> >> >