Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C2299C720 for ; Fri, 28 Nov 2014 17:20:35 +0000 (UTC) Received: (qmail 99937 invoked by uid 500); 28 Nov 2014 17:20:35 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 99885 invoked by uid 500); 28 Nov 2014 17:20:35 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 99876 invoked by uid 99); 28 Nov 2014 17:20:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2014 17:20:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2014 17:20:07 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BFD00238905A for ; Fri, 28 Nov 2014 17:19:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r930892 - in /websites/production/camel/content: cache/main.pageCache camel-and-scr.html Date: Fri, 28 Nov 2014 17:19:35 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141128171935.BFD00238905A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Fri Nov 28 17:19:35 2014 New Revision: 930892 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-and-scr.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/camel-and-scr.html ============================================================================== --- websites/production/camel/content/camel-and-scr.html (original) +++ websites/production/camel/content/camel-and-scr.html Fri Nov 28 17:19:35 2014 @@ -374,7 +374,7 @@ public class CamelScrExampleTest {

 

Now, let's take a look at the interesting bits one by one.

 

Using property prefixing
-

This allows you to override parts of the configuration by prefixing properties with "unit.". For example, unit.from overrides from for the unit test.

Prefixes, as a whole, can be used to cover the differences between the runtime environments where your routes might run. Moving the unchanged bundle through development, testing and production environments is a typical use case.

 

Getting test configuration from annotations
+

This allows you to override parts of the configuration by prefixing properties with "unit.". For example, unit.from overrides from for the unit test.

Prefixes can be used to handle the differences between the runtime environments where your routes might run. Moving the unchanged bundle through development, testing and production environments is a typical use case.

 

Getting test configuration from annotations

Here we configure the Service Component in test with the same properties that would be used in OSGi environment.

 

Mocking components for test
-

Here we send a message to a route in test.

Running the bundle in Apache Karaf

Once the bundle has been built with mvn install it's ready to be deployed. To deploy the project in Apache Karaf perform the following steps on Karaf command line:

Deploying the bundle in Apache Karaf
+

Here we send a message to a route in test.

Running the bundle in Apache Karaf

Once the bundle has been built with mvn install it's ready to be deployed. To deploy the bundle on Apache Karaf perform the following steps on Karaf command line:

Deploying the bundle in Apache Karaf
-

Or you can change the configuration directly by editing property files in Karaf's etc folder.

Using Camel SCR bundle as a template

Let's say you have a Camel SCR bundle that implements an integration pattern that you use frequently, say, from → to, with success/failure logging and redelivery which also happens to be the pattern our example route implements. You probably don't want to create a separate bundle for every instance. No worries, SCR has you covered.

Create a configuration PID for your Service Component, but add a tail with a dash and SCR will use that configuration to create a new instance of your component.

Creating a new Service Component instance
+

Or you can change the configuration by editing property files in Karaf's etc folder.

Using Camel SCR bundle as a template

Let's say you have a Camel SCR bundle that implements an integration pattern that you use frequently, say, from → to, with success/failure logging and redelivery which also happens to be the pattern our example route implements. You probably don't want to create a separate bundle for every instance. No worries, SCR has you covered.

Create a configuration PID for your Service Component, but add a tail with a dash and SCR will use that configuration to create a new instance of your component.

Creating a new Service Component instance