camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/4] camel git commit: CAMEL-6289: Separated broker example into cxf and jms. Thanks to Ravi Godbole for the patch.
Date Wed, 08 Feb 2017 09:41:02 GMT
http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/Bank.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/Bank.java b/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/Bank.java
deleted file mode 100644
index 270a570..0000000
--- a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/Bank.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.loanbroker.webservice.version.bank;
-
-//START SNIPPET: bankImpl
-public class Bank implements BankWS {
-    private String bankName;
-    private double primeRate;
-
-    public Bank(String name) {
-        bankName = name;
-        primeRate = 3.5;
-    }
-
-    public String getBankName() {
-        return bankName;
-    }
-
-    public BankQuote getQuote(String ssn, double loanAmount, int loanDuration, int creditHistory, int creditScore) {
-        Double rate = primeRate + (double)(loanDuration / 12) / 10 + Math.random() * 10 / 10;
-        // Wait for a while
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-            // do nothing here
-        }
-        BankQuote result = new BankQuote(bankName, ssn, rate);
-        return result;
-    }
-
-}
-//END SNIPPET: bankImpl

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankQuote.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankQuote.java b/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankQuote.java
deleted file mode 100644
index c6bc963..0000000
--- a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankQuote.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.loanbroker.webservice.version.bank;
-
-public class BankQuote {
-    private String bankName;
-    private String ssn;
-    private Double rate;
-
-    public BankQuote() {
-    }
-
-    public BankQuote(String name, String s, Double r) {
-        bankName = name;
-        ssn = s;
-        rate = r;
-    }
-
-    public void setBankName(String name) {
-        bankName = name;
-    }
-
-    public void setSsn(String s) {
-        ssn = s;
-    }
-
-    public void setRate(Double r) {
-        rate = r;
-    }
-
-    public String getBankName() {
-        return bankName;
-    }
-
-    public String getSsn() {
-        return ssn;
-    }
-
-    public Double getRate() {
-        return rate;
-    }
-
-    public String toString() {
-        return "[ssn:" + ssn + " bank:" + bankName + " rate:" + rate + "]";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankWS.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankWS.java b/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankWS.java
deleted file mode 100644
index e1057ce..0000000
--- a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/bank/BankWS.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.loanbroker.webservice.version.bank;
-
-import javax.jws.WebService;
-
-//START SNIPPET: bank
-// Since we use @WebServices here, please make sure to use JaxWs frontend API create the client and server
-@WebService
-public interface BankWS {
-
-    String getBankName();
-
-    BankQuote getQuote(String ssn, double loanAmount, int loanDuration, int creditHistory, int creditScore);
-
-}
-//END SNIPPET: bank
-

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgency.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgency.java b/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgency.java
deleted file mode 100644
index 01ab72c..0000000
--- a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgency.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.loanbroker.webservice.version.credit;
-
-//START SNIPPET: creditAgencyImpl
-public class CreditAgency implements CreditAgencyWS {
-
-    public int getCreditHistoryLength(String ssn) {
-        int creditScore = (int)(Math.random() * 600 + 300);
-        return creditScore;
-    }
-
-    public int getCreditScore(String ssn) {
-        int creditHistoryLength = (int)(Math.random() * 19 + 1);
-        return creditHistoryLength;
-    }
-
-}
-//END SNIPPET: creditAgencyImpl

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgencyWS.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgencyWS.java b/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgencyWS.java
deleted file mode 100644
index f791c04..0000000
--- a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/credit/CreditAgencyWS.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.loanbroker.webservice.version.credit;
-
-import javax.jws.WebService;
-
-//START SNIPPET: creditAgency
-@WebService
-public interface CreditAgencyWS {
-
-    int getCreditScore(String ssn);
-
-    int getCreditHistoryLength(String ssn);
-
-}
-//END SNIPPET: creditAgency
-

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/resources/META-INF/LICENSE.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/resources/META-INF/LICENSE.txt b/examples/camel-example-loan-broker/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/examples/camel-example-loan-broker/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/resources/META-INF/NOTICE.txt b/examples/camel-example-loan-broker/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/examples/camel-example-loan-broker/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-   =========================================================================
-   ==  NOTICE file corresponding to the section 4 d of                    ==
-   ==  the Apache License, Version 2.0,                                   ==
-   ==  in this case for the Apache Camel distribution.                    ==
-   =========================================================================
-
-   This product includes software developed by
-   The Apache Software Foundation (http://www.apache.org/).
-
-   Please read the different LICENSE files present in the licenses directory of
-   this distribution.

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/webServiceCamelContext.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/webServiceCamelContext.xml b/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/webServiceCamelContext.xml
deleted file mode 100644
index b083c5e..0000000
--- a/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/webServiceCamelContext.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:camel="http://camel.apache.org/schema/spring"
-       xmlns:cxf="http://camel.apache.org/schema/cxf"
-       xmlns:jaxws="http://cxf.apache.org/jaxws"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="
-         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
-         http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-         http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
-         http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
-
-  <!-- spring property placeholder, ignore resource not found as the file resource is for unit testing -->
-  <context:property-placeholder location="classpath:loanbroker.properties,file:target/custom.properties"
-                                ignore-resource-not-found="true"/>
-
-  <!-- web service for credit agency -->
-  <jaxws:endpoint id="creditAgent"
-                  implementor="org.apache.camel.loanbroker.webservice.version.credit.CreditAgency"
-                  address="http://localhost:${credit_agency.port}/creditAgency"/>
-
-  <bean id="bank1" class="org.apache.camel.loanbroker.webservice.version.bank.Bank">
-    <constructor-arg index="0">
-      <value>bank1</value>
-    </constructor-arg>
-  </bean>
-
-  <bean id="bank2" class="org.apache.camel.loanbroker.webservice.version.bank.Bank">
-    <constructor-arg index="0">
-      <value>bank2</value>
-    </constructor-arg>
-  </bean>
-
-  <bean id="bank3" class="org.apache.camel.loanbroker.webservice.version.bank.Bank">
-    <constructor-arg index="0">
-      <value>bank3</value>
-    </constructor-arg>
-  </bean>
-
-  <!-- web service for the 3 banks -->
-  <jaxws:endpoint id="bankService1"
-                  implementor="#bank1"
-                  address="http://localhost:${bank1.port}/bank1"/>
-
-  <jaxws:endpoint id="bankService2"
-                  implementor="#bank2"
-                  address="http://localhost:${bank2.port}/bank2"/>
-
-  <jaxws:endpoint id="bankService3"
-                  implementor="#bank3"
-                  address="http://localhost:${bank3.port}/bank3"/>
-  
-  
-  <!-- loan broker web service -->
-  <cxf:cxfEndpoint id="loanBroker"
-                   address="http://localhost:${loan_broker.port}/loanBroker"
-                   serviceClass="org.apache.camel.loanbroker.webservice.version.LoanBrokerWS"/>
-
-  <!-- Camel -->
-  <camel:camelContext id="webService">
-
-    <!-- define endpoints for the banks -->
-    <camel:endpoint id="bank1WS" uri="cxf://http://localhost:${bank1.port}/bank1?serviceClass=org.apache.camel.loanbroker.webservice.version.bank.BankWS"/>
-    <camel:endpoint id="bank2WS" uri="cxf://http://localhost:${bank2.port}/bank2?serviceClass=org.apache.camel.loanbroker.webservice.version.bank.BankWS"/>
-    <camel:endpoint id="bank3WS" uri="cxf://http://localhost:${bank3.port}/bank3?serviceClass=org.apache.camel.loanbroker.webservice.version.bank.BankWS"/>
-
-    <camel:route id="loanBrokerRoute">
-      <camel:from uri="cxf:bean:loanBroker"/>
-      <camel:process ref="creditScoreProcessor"/>
-      <camel:multicast parallelProcessing="true" strategyRef="bankResponse">
-        <camel:to ref="bank1WS"/>
-        <camel:to ref="bank2WS"/>
-        <camel:to ref="bank3WS"/>
-      </camel:multicast>
-      <camel:process ref="replyProcessor"/>
-    </camel:route>
-  </camel:camelContext>
-
-  <!-- processor to calculate credit score -->
-  <bean id="creditScoreProcessor" class="org.apache.camel.loanbroker.webservice.version.CreditScoreProcessor">
-    <constructor-arg index="0" value="http://localhost:${credit_agency.port}/creditAgency"/>
-  </bean>
-  
-  <bean id="replyProcessor" class="org.apache.camel.loanbroker.webservice.version.ReplyProcessor"/>
-  
-  <!-- strategy to assemble the bank responses -->
-  <bean id="bankResponse" class="org.apache.camel.loanbroker.webservice.version.BankResponseAggregationStrategy"/>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/resources/features.xml b/examples/camel-example-loan-broker/src/main/resources/features.xml
deleted file mode 100644
index 37f9d23..0000000
--- a/examples/camel-example-loan-broker/src/main/resources/features.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<features>
-    <repository>mvn:org.apache.camel.karaf/apache-camel/${project.version}/xml/features</repository>
-    
-    <feature name='activemq-feature' version='${project.version}'>
-       <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
-       <bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
-       <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
-       <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
-       <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-pool/1.5.4_1</bundle>
-       <bundle>mvn:org.apache.xbean/xbean-spring/3.4.3</bundle>
-       <bundle>mvn:org.apache.activemq/kahadb/${activemq-version}</bundle>
-       <bundle>mvn:org.apache.activemq/activemq-core/${activemq-version}</bundle>
-       <bundle>mvn:org.apache.activemq/activemq-ra/${activemq-version}</bundle>
-       <bundle>mvn:org.apache.activemq/activemq-pool/${activemq-version}</bundle>
-       <bundle>mvn:org.apache.activemq/activemq-camel/${activemq-version}</bundle>
-    </feature>
-    
-    <feature name='camel-example-loan-broker' version='${project.version}'>
-        <feature version="${project.version}">camel</feature>
-        <feature version="${project.version}">camel-jms</feature>
-        <feature version="${project.version}">camel-cxf</feature>
-        <bundle>mvn:org.apache.camel/camel-example-loan-broker/${project.version}</bundle>
-    </feature>
-
-</features>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/resources/loanbroker.properties
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/resources/loanbroker.properties b/examples/camel-example-loan-broker/src/main/resources/loanbroker.properties
deleted file mode 100644
index 7cc9889..0000000
--- a/examples/camel-example-loan-broker/src/main/resources/loanbroker.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-## ------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ------------------------------------------------------------------------
-
-# properties for the application
-bank1.port=9001
-bank2.port=9002
-bank3.port=9003
-credit_agency.port=9006
-loan_broker.port=9008

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/resources/log4j2.properties
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/resources/log4j2.properties b/examples/camel-example-loan-broker/src/main/resources/log4j2.properties
deleted file mode 100644
index a937db3..0000000
--- a/examples/camel-example-loan-broker/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-appender.stdout.type = Console
-appender.stdout.name = stdout
-appender.stdout.layout.type = PatternLayout
-appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.stdout.ref = stdout

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/main/resources/logging.properties
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/main/resources/logging.properties b/examples/camel-example-loan-broker/src/main/resources/logging.properties
deleted file mode 100644
index 41f062c..0000000
--- a/examples/camel-example-loan-broker/src/main/resources/logging.properties
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-#
-#    Licensed to the Apache Software Foundation (ASF) under one
-#    or more contributor license agreements. See the NOTICE file
-#    distributed with this work for additional information
-#    regarding copyright ownership. The ASF licenses this file
-#    to you under the Apache License, Version 2.0 (the
-#    "License"); you may not use this file except in compliance
-#    with the License. You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing,
-#    software distributed under the License is distributed on an
-#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#    KIND, either express or implied. See the License for the
-#    specific language governing permissions and limitations
-#    under the License.
-#
-#
-############################################################
-#  	Default Logging Configuration File
-#
-# You can use a different file by specifying a filename
-# with the java.util.logging.config.file system property.
-# For example java -Djava.util.logging.config.file=myfile
-############################################################
-
-############################################################
-#  	Global properties
-############################################################
-
-# "handlers" specifies a comma separated list of log Handler
-# classes.  These handlers will be installed during VM startup.
-# Note that these classes must be on the system classpath.
-# By default we only configure a ConsoleHandler, which will only
-# show messages at the INFO and above levels.
-#handlers= java.util.logging.ConsoleHandler
-
-# To also add the FileHandler, use the following line instead.
-#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
-
-# Default global logging level.
-# This specifies which kinds of events are logged across
-# all loggers.  For any given facility this global level
-# can be overriden by a facility specific level
-# Note that the ConsoleHandler also has a separate level
-# setting to limit messages printed to the console.
-.level= WARNING
-
-############################################################
-# Handler specific properties.
-# Describes specific configuration info for Handlers.
-############################################################
-
-# default file output is in user's home directory.
-java.util.logging.FileHandler.pattern = %h/java%u.log
-java.util.logging.FileHandler.limit = 50000
-java.util.logging.FileHandler.count = 1
-java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
-
-# Limit the message that are printed on the console to INFO and above.
-java.util.logging.ConsoleHandler.level = WARNING
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-
-
-############################################################
-# Facility specific properties.
-# Provides extra control for each logger.
-############################################################
-
-# For example, set the com.xyz.foo logger to only log SEVERE
-# messages:
-#com.xyz.foo.level = SEVERE

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/queue/version/LoanBrokerQueueTest.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/queue/version/LoanBrokerQueueTest.java b/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/queue/version/LoanBrokerQueueTest.java
deleted file mode 100644
index 7409a5a..0000000
--- a/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/queue/version/LoanBrokerQueueTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.loanbroker.queue.version;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.jms.JmsComponent;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.test.junit4.TestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class LoanBrokerQueueTest extends TestSupport {
-    protected CamelContext camelContext;
-    protected JmsBroker broker;
-    protected ProducerTemplate template;
- 
-    @Before
-    public void startServices() throws Exception {
-        deleteDirectory("activemq-data");
-
-        camelContext = new DefaultCamelContext();
-        broker = new JmsBroker("vm://localhost");
-        broker.start();
-        
-        // Set up the ActiveMQ JMS Components
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost");
-
-        // Note we can explicitly name the component
-        camelContext.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
-
-        camelContext.addRoutes(new LoanBrokerRoute());
-       
-        template = camelContext.createProducerTemplate();
-        camelContext.start();
-    }
-    
-    @After
-    public void stopServices() throws Exception {
-        if (camelContext != null) {
-            camelContext.stop();
-        }
-        
-        Thread.sleep(1000);
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-    
-    @Test
-    public void testClientInvocation() throws Exception {
-        String out = template.requestBodyAndHeader("jms:queue:loan", null, Constants.PROPERTY_SSN, "Client-A", String.class);
-        
-        log.info("Result: {}", out);
-        assertNotNull(out);
-        assertTrue(out.startsWith("The best rate is [ssn:Client-A bank:bank"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java b/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
deleted file mode 100644
index 6a86678..0000000
--- a/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.loanbroker.webservice.version;
-
-import java.io.File;
-import java.io.FileOutputStream;
-
-import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class LoanBrokerWSTest extends CamelSpringTestSupport {
-    
-    private static String url;
-    
-    @BeforeClass
-    public static void setupFreePort() throws Exception {
-        // find a free port number, and write that in the custom.properties file
-        // which we will use for the unit tests, to avoid port number in use problems
-        int port = AvailablePortFinder.getNextAvailable(); 
-        String bank1 = "bank1.port=" + port;
-        port = AvailablePortFinder.getNextAvailable();
-        String bank2 = "bank2.port=" + port;
-        port = AvailablePortFinder.getNextAvailable();
-        String bank3 = "bank3.port=" + port;
-        port = AvailablePortFinder.getNextAvailable();
-        String credit = "credit_agency.port=" + port;
-        port = AvailablePortFinder.getNextAvailable();
-        String loan = "loan_broker.port=" + port;
-
-        File custom = new File("target/custom.properties");
-        FileOutputStream fos = new FileOutputStream(custom);
-        fos.write(bank1.getBytes());
-        fos.write("\n".getBytes());
-        fos.write(bank2.getBytes());
-        fos.write("\n".getBytes());
-        fos.write(bank3.getBytes());
-        fos.write("\n".getBytes());
-        fos.write(credit.getBytes());
-        fos.write("\n".getBytes());
-        fos.write(loan.getBytes());
-        fos.write("\n".getBytes());
-        fos.close();
-
-        url = "http://localhost:" + port + "/loanBroker";
-    }
-
-    @Test
-    public void testInvocation() throws Exception {
-        LoanBrokerWS loanBroker = Client.getProxy(url);
-        String result = loanBroker.getLoanQuote("SSN", 1000.54, 10);
-        log.info("Result: {}", result);
-        assertTrue(result.startsWith("The best rate is [ssn:SSN bank:bank"));
-    }
-
-    @Override
-    protected AbstractApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("/META-INF/spring/webServiceCamelContext.xml");
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/camel-example-loan-broker/src/test/resources/log4j2.properties
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/src/test/resources/log4j2.properties b/examples/camel-example-loan-broker/src/test/resources/log4j2.properties
deleted file mode 100644
index c6d2618..0000000
--- a/examples/camel-example-loan-broker/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-appender.file.type = File
-appender.file.name = file
-appender.file.fileName = target/camel-example-loan-broker-test.log
-appender.file.layout.type = PatternLayout
-appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.file.ref = file
-

http://git-wip-us.apache.org/repos/asf/camel/blob/054515d2/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index f8223dd..492b2b2 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -63,7 +63,8 @@
     <module>camel-example-jmx</module>
     <module>camel-example-jms-file</module>
     <module>camel-example-loadbalancing</module>
-    <module>camel-example-loan-broker</module>
+    <module>camel-example-loan-broker-cxf</module>
+    <module>camel-example-loan-broker-jms</module>
     <module>camel-example-management</module>
     <module>camel-example-mybatis</module>
     <module>camel-example-netty-http</module>


Mime
View raw message