[CONF] Apache Camel Transactional Client

2014-03-06 Thread Carsten Ringe (Confluence)














  


Carsten Ringe bearbeitete die Seite:
 


Transactional Client   




 Kommentar: formatting and syntax highlight 


...
You first define needed object in the spring configuration.



 Codeblock









xml


 




 
 bean id=jmsTransactionManager class=org.springframework.jms.connection.JmsTransactionManager
property name=connectionFactory ref=jmsConnectionFactory /
  /bean

  bean id=jmsConnectionFactory class=org.apache.activemq.ActiveMQConnectionFactory
property name=brokerURL value=tcp://localhost:61616/
  /bean
 



Then you look them up and use them to create the JmsComponent.



 Codeblock








language
java


 




 
 PlatformTransactionManager transactionManager = (PlatformTransactionManager) spring.getBean(jmsTransactionManager);
  

svn commit: r900225 - in /websites/production/camel/content: cache/main.pageCache transactional-client.html

2014-03-06 Thread buildbot
Author: buildbot
Date: Thu Mar  6 09:19:52 2014
New Revision: 900225

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/transactional-client.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/transactional-client.html
==
--- websites/production/camel/content/transactional-client.html (original)
+++ websites/production/camel/content/transactional-client.html Thu Mar  6 
09:19:52 2014
@@ -86,32 +86,15 @@
tbody
 tr
 td valign=top width=100%
-div class=wiki-content maincontenth3 
id=TransactionalClient-TransactionalClientTransactional Client/h3
-pCamel recommends supporting the a shape=rect class=external-link 
href=http://www.enterpriseintegrationpatterns.com/TransactionalClient.html; 
rel=nofollowTransactional Client/a from the a shape=rect 
href=enterprise-integration-patterns.htmlEIP patterns/a using spring 
transactions./p
-
-pimg class=confluence-embedded-image confluence-external-resource 
src=http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif;
 
data-image-src=http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif;/p
-
-pTransaction Oriented Endpoints (a shape=rect 
href=what-is-a-camel-toe.htmlCamel Toes/a) like a shape=rect 
href=jms.htmlJMS/a support using a transaction for both inbound and 
outbound message exchanges.  Endpoints that support transactions will 
participate in the current transaction context that they are called from./p
-
-div class=aui-message success shadowed information-macro
+div class=wiki-content maincontenth3 
id=TransactionalClient-TransactionalClientTransactional Client/h3pCamel 
recommends supporting the a shape=rect class=external-link 
href=http://www.enterpriseintegrationpatterns.com/TransactionalClient.html; 
rel=nofollowTransactional Client/a from the a shape=rect 
href=enterprise-integration-patterns.htmlEIP patterns/a using spring 
transactions./ppimg class=confluence-embedded-image 
confluence-external-resource 
src=http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif;
 
data-image-src=http://www.enterpriseintegrationpatterns.com/img/TransactionalClientSolution.gif;/ppTransaction
 Oriented Endpoints (a shape=rect href=what-is-a-camel-toe.htmlCamel 
Toes/a) like a shape=rect href=jms.htmlJMS/a support using a 
transaction for both inbound and outbound message exchanges. Endpoints that 
support transactions will participate in the current transaction context that 
they 
 are called from./pdiv class=aui-message success shadowed 
information-macro
 p class=titleConfiguration of Redelivery/p
 span class=aui-icon icon-successIcon/span
 div class=message-content
-
-pThe redelivery in transacted mode is strongnot/strong handled by Camel 
but by the backing system (the transaction manager). In such cases you should 
resort to the backing system how to configure the redelivery. /p
+pThe redelivery in transacted mode is 
strongnot/strong handled by Camel but by the backing system (the 
transaction manager). In such cases you should resort to the backing system how 
to configure the redelivery./p
 /div
 /div
-
-
-pYou should use the a shape=rect class=external-link 
href=http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/SpringRouteBuilder.html;SpringRouteBuilder/a
 to setup the routes since you will need to setup the spring context with the 
a shape=rect class=external-link 
href=http://www.springframework.org/docs/api/org/springframework/transaction/support/TransactionTemplate.html;
 rel=nofollowTransactionTemplate/as that will define the transaction 
manager configuration and policies./p
-
-pFor inbound endpoint to be transacted, they normally need to be configured 
to use a Spring a shape=rect class=external-link 
href=http://www.springframework.org/docs/api/org/springframework/transaction/PlatformTransactionManager.html;
 rel=nofollowPlatformTransactionManager/a.  In the case of the JMS 
component, this can be done by looking it up in the spring context./p
-
-pYou first define needed object in the spring configuration./p
-
-div class=code panel pdl style=border-width: 1px;div class=codeContent 
panelContent pdl
-script class=theme: Default; brush: xml; gutter: false 
type=syntaxhighlighter![CDATA[
-  lt;bean id=quot;jmsTransactionManagerquot; 
class=quot;org.springframework.jms.connection.JmsTransactionManagerquot;gt;
+pYou should use the a shape=rect class=external-link 

[CONF] Apache Camel Articles

2014-03-06 Thread Claus Ibsen (Confluence)














  


Claus Ibsen edited the page:
 


Articles   






...
Archived Webinars and Screencasts

 Effective System Integrations with Apache Camel (March 2014) by Jakub Korab 
 Getting started with Apache Camel video from BarcelonaJUG (January 2014) by Claus Ibsen
 Camel in the cloud demo from CamelOne 2013 - Video presentation from CamelOne 2013 demonstrating Camel in the cloud using Fuse Fabric and hawtio 
 Getting started with Apache Camel - Video presentation from Javagruppen meeting by Claus Ibsen (May 2013)
 Apache Camel Essential Components by Christian Posta (January 2013)
 Leverage Enterprise Integration Patterns with Apache Camel and Twitter by Bruno Borges (JavaOne 2012)
 Riding the Apache Camel into the cloud James Strachan (QCon 2012)
 Migrating akka-camel module to Akka 2.x by Peter Gabryanczy (ScalaDays 2012)
 Confident Data Transfers with Apache Camel Security by Dominik Schadow (JavaOne 2012)
 CamelOne 2012 Videos - All the videos from the CamelOne 2012 conference (May 2012)
 JavaOne 2012 - Leverage Enterprise Integration Patterns with Apache Camel and Twitter by Bruno Borges (JavaOne 2012)
 Using Apache Camel and Java EE in an OSGi World by Jeff Genender and Johan Edstrom (JavaOne 2011)
 Er Apache Camel riktig valg for deg? Lytt til erfarne Camel spotters by Rune Peter Bjrnstad, and Bjrn Nordlund(September 2011)
 In the brain of James Strachan, riding the Camel - by James Strachan (August 2011)
 CamelOne 2011 Video presentations CamelOne 2011 conference (May 2011)
 What Riding the Camel can make integration easier for you by Claus Ibsen (September 2011)
 Paris JUG 2011 - Integration with Apache Camel and ESB by Charles Moulliard 
 JEEConf 2011 - What riding the Camel can do to make integration easier for you by Claus Ibsen (May 2011).
 Belgium JUG 2011 - Integration with Apache ServiceMix and Camel by Charles Moulliard 
 Devoxx 2011 - Introduction to Apache ActiveMQ, ServiceMix, Camel and CXF by Charles Moulliard and Gert Vanthienen 
 Claus Ibsen's Devoxx 2010 talk is all about Apache Camel
 Introduction to messaging with ActiveMQ at redev 2008 conference by Bruce Snyder 
 James Strachan's Devoxx 2009 talk is mostly about Camel and ActiveMQ
ScreenCast: an introduction to Apache Camel and the use of Enterprise Integration Patterns in Medium Resolution or High Resolution by James Strachan 
 Taking Camel for a ride by Bruce Snyder 
   

[1/2] git commit: CAMEL-7275: Fixed doTry .. doCatch using recipient list/multicast etc. not working as expected to let the doCatch handle the errors.

2014-03-06 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x 2da8fa965 - 3cbc7fc69
  refs/heads/master 7965b3c62 - 44cad623a


CAMEL-7275: Fixed doTry .. doCatch using recipient list/multicast etc. not 
working as expected to let the doCatch handle the errors.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/44cad623
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/44cad623
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/44cad623

Branch: refs/heads/master
Commit: 44cad623a7568a3fa366c0374f1a8a65ddcb21a1
Parents: 7965b3c
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Mar 6 15:00:26 2014 +0100
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Mar 6 15:00:26 2014 +0100

--
 .../main/java/org/apache/camel/Exchange.java|   1 +
 .../camel/processor/MulticastProcessor.java |   5 +-
 .../apache/camel/processor/TryProcessor.java|   4 +
 .../processor/TryCatchRecipientListTest.java| 254 +++
 4 files changed, 263 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/44cad623/camel-core/src/main/java/org/apache/camel/Exchange.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/Exchange.java 
b/camel-core/src/main/java/org/apache/camel/Exchange.java
index 506ba29..f9f3fe3 100644
--- a/camel-core/src/main/java/org/apache/camel/Exchange.java
+++ b/camel-core/src/main/java/org/apache/camel/Exchange.java
@@ -194,6 +194,7 @@ public interface Exchange {
 String TRACE_EVENT_NODE_ID   = CamelTraceEventNodeId;
 String TRACE_EVENT_TIMESTAMP = CamelTraceEventTimestamp;
 String TRACE_EVENT_EXCHANGE  = CamelTraceEventExchange;
+String TRY_ROUTE_BLOCK   = TryRouteBlock;
 String TRANSFER_ENCODING = Transfer-Encoding;
 
 String UNIT_OF_WORK_EXHAUSTED= CamelUnitOfWorkExhausted;

http://git-wip-us.apache.org/repos/asf/camel/blob/44cad623/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java 
b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index 69e4667..697ae32 100644
--- 
a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -885,7 +885,10 @@ public class MulticastProcessor extends ServiceSupport 
implements AsyncProcessor
 protected Processor createErrorHandler(RouteContext routeContext, Exchange 
exchange, Processor processor) {
 Processor answer;
 
-if (routeContext != null) {
+boolean tryBlock = exchange.getProperty(Exchange.TRY_ROUTE_BLOCK, 
false, boolean.class);
+
+// do not wrap in error handler if we are inside a try block
+if (!tryBlock  routeContext != null) {
 // wrap the producer in error handler so we have fine grained 
error handling on
 // the output side instead of the input side
 // this is needed to support redelivery on that output alone and 
not doing redelivery

http://git-wip-us.apache.org/repos/asf/camel/blob/44cad623/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java 
b/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
index 1bfe5dd..b53a14e 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
@@ -73,6 +73,7 @@ public class TryProcessor extends ServiceSupport implements 
AsyncProcessor, Navi
 exchange.setProperty(Exchange.EXCEPTION_HANDLED, null);
 
 while (continueRouting(processors, exchange)) {
+exchange.setProperty(Exchange.TRY_ROUTE_BLOCK, true);
 ExchangeHelper.prepareOutToIn(exchange);
 
 // process the next processor
@@ -92,6 +93,7 @@ public class TryProcessor extends ServiceSupport implements 
AsyncProcessor, Navi
 }
 
 ExchangeHelper.prepareOutToIn(exchange);
+exchange.removeProperty(Exchange.TRY_ROUTE_BLOCK);
 exchange.setProperty(Exchange.EXCEPTION_HANDLED, lastHandled);
 LOG.trace(Processing complete for exchangeId: {}  {}, 
exchange.getExchangeId(), exchange);
 callback.done(true);
@@ -115,6 +117,7 @@ public class TryProcessor extends ServiceSupport implements 
AsyncProcessor, Navi
 
 // continue processing the try .. catch .. finally 
asynchronously
 while 

[CONF] Apache Camel Couchbase

2014-03-06 Thread Ugo Landini (Confluence)














  


Ugo Landini edited the page:
 


Couchbase   






...




Name
Default Value
Type
Context
Description


additionalHosts

String
Shared
Comma separated list of additional hostnames


designDocumentName
beer
String
Consumer
The Document Design name, defaults to the beer example distributed with Couchbase


viewName
brewery_beers
String
Consumer
The Document view name, defaults, to the beer example distributed with Couchbase


limit
-1
int
Consumer
Limit the number of results that should be returned, default is unlimited


descending
false
boolean
Consumer
Revert the sorting order of the result set.


skip
0
int
 

svn commit: r900321 - in /websites/production/camel/content: cache/main.pageCache couchbase.html

2014-03-06 Thread buildbot
Author: buildbot
Date: Thu Mar  6 18:19:24 2014
New Revision: 900321

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/couchbase.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/couchbase.html
==
--- websites/production/camel/content/couchbase.html (original)
+++ websites/production/camel/content/couchbase.html Thu Mar  6 18:19:24 2014
@@ -94,7 +94,7 @@
 lt;/dependencygt;]]/script
 /div/divh3 id=Couchbase-URIformatURI format/h3div class=code panel 
pdl style=border-width: 1px;div class=codeContent panelContent pdl
 script class=theme: Default; brush: java; gutter: false 
type=syntaxhighlighter![CDATA[couchbase:http[s]://hostname/bucket?[options]]]/script
-/div/divh3 id=Couchbase-URIoptionsURI options/h3div 
class=table-wraptable class=confluenceTabletbodytrth colspan=1 
rowspan=1 class=confluenceThName/thth colspan=1 rowspan=1 
class=confluenceThDefault Value/thth colspan=1 rowspan=1 
class=confluenceThType/thth colspan=1 rowspan=1 
class=confluenceThContext/thth colspan=1 rowspan=1 
class=confluenceThDescription/th/trtrtd colspan=1 rowspan=1 
class=confluenceTddesignDocumentName/tdtd colspan=1 rowspan=1 
class=confluenceTdbeer/tdtd colspan=1 rowspan=1 
class=confluenceTdString/tdtd colspan=1 rowspan=1 
class=confluenceTdConsumer/tdtd colspan=1 rowspan=1 
class=confluenceTdThe Document Design name, defaults to the beer example 
distributed with Couchbase/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdviewName/tdtd colspan=1 rowspan=1 
class=confluenceTdbrewery_beers/tdtd colspan=1 rowspan=1
  class=confluenceTdString/tdtd colspan=1 rowspan=1 
class=confluenceTdConsumer/tdtd colspan=1 rowspan=1 
class=confluenceTdThe Document view name, defaults, to the spanbeer 
example spandistributed with Couchbase/span/span/td/trtrtd 
colspan=1 rowspan=1 class=confluenceTdlimit/tdtd colspan=1 
rowspan=1 class=confluenceTd-1/tdtd colspan=1 rowspan=1 
class=confluenceTdint/tdtd colspan=1 rowspan=1 
class=confluenceTdConsumer/tdtd colspan=1 rowspan=1 
class=confluenceTdspanLimit the number of results that should be returned, 
default is /spanunlimited/td/trtrtd colspan=1 rowspan=1 
class=confluenceTddescending/tdtd colspan=1 rowspan=1 
class=confluenceTdfalse/tdtd colspan=1 rowspan=1 
class=confluenceTdboolean/tdtd colspan=1 rowspan=1 
class=confluenceTdConsumer/tdtd colspan=1 rowspan=1 
class=confluenceTdspanRevert the sorting order of the result set./spa
 n/td/trtrtd colspan=1 rowspan=1 class=confluenceTdskip/tdtd 
colspan=1 rowspan=1 class=confluenceTd0/tdtd colspan=1 rowspan=1 
class=confluenceTdint/tdtd colspan=1 rowspan=1 
class=confluenceTdConsumer/tdtd colspan=1 rowspan=1 
class=confluenceTdNumber of results to skip/td/trtrtd colspan=1 
rowspan=1 class=confluenceTdrangeStartKey/tdtd colspan=1 rowspan=1 
class=confluenceTdspan/span/tdtd colspan=1 rowspan=1 
class=confluenceTdString/tdtd colspan=1 rowspan=1 
class=confluenceTdConsumer/tdtd colspan=1 rowspan=1 
class=confluenceTdspan style=color: rgb(53,56,51);Start Key to return 
records in the given key range./span/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdrangeEndKey/tdtd colspan=1 rowspan=1 
class=confluenceTdspan/span/tdtd colspan=1 rowspan=1 
class=confluenceTdString/tdtd colspan=1 rowspan=1 
class=confluenceTdCon
 sumer/tdtd colspan=1 rowspan=1 class=confluenceTdspan style=color: 
rgb(53,56,51);End Key to return records in the given key 
range./span/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdconsumerProcessedStrategy/tdtd colspan=1 rowspan=1 
class=confluenceTdnone/tdtd colspan=1 rowspan=1 
class=confluenceTdString/tdtd colspan=1 rowspan=1 
class=confluenceTdConsumer/tdtd colspan=1 rowspan=1 
class=confluenceTdpThe strategy applied with consumed documents/ppnone 
= consumed documents are untouched, you should beware of duplicates (f.e. use 
an idempotent receiver)/ppdelete = consumed documents are 
deleted/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdoperation/tdtd colspan=1 rowspan=1 
class=confluenceTdPUT/tdtd colspan=1 rowspan=1 
class=confluenceTdString/tdtd colspan=1 rowspan=1 
class=confluenceTdProducer/tdtd colspan=1 rowspan=1 
class=confluenceTdThe opera
 tion to perform, currently supports the following values: PUT, DELETE, 
GET/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdautoStartIdForInserts/tdtd colspan=1 rowspan=1 
class=confluenceTdfalse/tdtd colspan=1 rowspan=1 
class=confluenceTdboolean/tdtd colspan=1 rowspan=1 
class=confluenceTdProducer/tdtd colspan=1 rowspan=1 
class=confluenceTdIf set to true, document id will be automatically 
generated/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdstartingIdForInsertsFrom/tdtd colspan=1 rowspan=1 
class=confluenceTd0/tdtd 

[CONF] Apache Camel Camel 2.12.2 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.12.2 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.12.2.zip  
  apache-camel-2.12.2.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.12.2.tar.gz  
  apache-camel-2.12.2.tar.gz.asc  




...




 Description 
 Download Link 
 PGP Signature file of download 


 Source (zip) 
  apache-camel-2.12.2-src.zip  
  apache-camel-2.12.2-src.zip.asc  




...






 View Online   Like   View Changes  
 Stop watching space   Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






[CONF] Apache Camel Camel 2.12.1 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.12.1 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.12.1.zip  
  apache-camel-2.12.1.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.12.1.tar.gz  
  apache-camel-2.12.1.tar.gz.asc  




...




 Description 
 Download Link 
 PGP Signature file of download 


 Source (zip) 
  apache-camel-2.12.1-src.zip  
  apache-camel-2.12.1-src.zip.asc  




...
To use this release in your maven project, the proper dependency configuration that you should use in your Maven POM is:



 Code Block








  

[CONF] Apache Camel Camel 2.12.0 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.12.0 Release   






...

Fixed setting .id in Java DSL on some EIPs such as the Validate 
Fixed Dead Letter Channel always handled exception, which wasn't the case if an Exception Clause was in use, which didn't had handled=true.
Fixed Using PropertyPlaceholder in attributes defined on camelContext.
All Camel Components will configure their consumers when being created to ensure you can configure from URIs with consumer. as prefix.
Fixed QuickfixJEndpoint to adhere a given InOut MEP correctly.
Fixed using property placeholders in a Simple predicate used inside a when in a Content Based Router when using Java DSL 
Fixed a race condition in File consumer which may lead to a tiny window for another process to pickup a file, as the read lock is committed before the file is moved afterwards etc. Now read locks is executed last.
 HTTP4 now validates that only one instance of org.apache.camel.util.jsse.SSLContextParameters is used per component, as multiple is not supported, and could lead to undesired side effects.
Fixed possible dead-lock during Graceful Shutdown if a route starts from SEDA and uses Splitter or Multicast and maximumRedeliveries was enabled as well.
Fixed TokenizeXML to support self closing tags.
Fixed Blueprint Testing to work with isMockEndpointsAndSkip and other similar functionality of the CamelBlueprintTestSupport class.
Fixed Routing Slip to emit ExchangeSentEvents also
Fixed Quartz routes with stateful jobs may not trigger if redeployment with changed endpoint uris.
Fixed Recipient List, Routing Slip, and Dynamic Router EIPs to work with Stream Cachingcaching 
Fixed suspending/resuming Camel Quartz routes
Fixed SQL Component using queries with a single parameter and the data is JSON like structure (having comma separators)
Fixed Jetty to be able to use stream cached streams that was spooled to disk, as its reply message when sending back reply to the caller.
Fixed endChoice() in Java DSL to work when being nested in parent Content Based Router(s)
Fixed Lucene to reuse existing index directory if Camel is being restarted etc.
Fixed using routeContextRef to not share the routes when using multiple camelContext, but each camelContext have their own route instances to not cause side-effects between the CamelContexts.
Fixed using type converter from NodeList - Node 
Fixed having 2+ routes from the same JMS queue, not stop the endpoint if there are still active listeners when a route is stopped.
Fixed SEDA when using queueSize not able to identify its same queue size, when 

[CONF] Apache Camel Camel 2.12.0 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.12.0 Release   






 Camel 2.12.0 release 



 Wiki Markup




 {div:style=padding-right:20px;float:left;margin-left:-20px;}
!http://camel.apache.org/download.data/camel-box-v1.0-150x200.png!
{div} 



...




 Description 
 Download Link 
 PGP Signature file of download 


 Source for Windows 
  apache-camel-2.12.0-src.zip  
  apache-camel-2.12.0-src.zip.asc  








  Source for Unix/Linux/Cygwin  
  apache-camel-2.12.0-src.tar.gz  
  apache-camel-2.12.0-src.tar.gz.asc  




  
 Getting the Binaries using Maven 2 
To use this release in your maven project, the proper dependency configuration that you should use in your Maven POM is:
...






 View Online   Like   View Changes  
 Stop watching space   Manage Notifications  


 
  

[CONF] Apache Camel Camel 2.12.2 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.12.2 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.12.2.zip  
  apache-camel-2.12.2.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.12.2.tar.gz  
  apache-camel-2.12.2.tar.gz.asc  




...




 Description 
 Download Link 
 PGP Signature file of download 


 Source (zip) 
  apache-camel-2.12.2-src.zip  
  apache-camel-2.12.2-src.zip.asc  




...






 View Online   Like   View Changes  
 Stop watching space   Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






[CONF] Apache Camel Camel 2.12.2 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.12.2 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.12.2.zip  
  apache-camel-2.12.2.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.12.2.tar.gz  
  apache-camel-2.12.2.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.12.0 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.12.0 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.12.0.zip  
  apache-camel-2.12.0.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.12.0.tar.gz  
  apache-camel-2.12.0.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.11.3 release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.11.3 release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.11.3.zip  
  apache-camel-2.11.3.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.11.3.tar.gz  
  apache-camel-2.11.3.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.11.2 release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.11.2 release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.11.2.zip  
  apache-camel-2.11.2.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.11.2.tar.gz  
  apache-camel-2.11.2.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.11.2 release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.11.2 release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.11.2.zip  
  apache-camel-2.11.2.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.11.2.tar.gz  
  apache-camel-2.11.2.tar.gz.asc  




...






 View Online   Like   View Changes  
 Stop watching space   Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






[CONF] Apache Camel Camel 2.11.1 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.11.1 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.11.1.zip  
  apache-camel-2.11.1.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.11.1.tar.gz  
  apache-camel-2.11.1.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.10.0 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.0 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.0.zip  
  apache-camel-2.10.0.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.0.tar.gz  
  apache-camel-2.10.0.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using Firefox  



...





[CONF] Apache Camel Camel 2.10.1 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.1 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.1.zip  
  apache-camel-2.10.1.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.1.tar.gz  
  apache-camel-2.10.1.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





svn commit: r900347 [4/4] - in /websites/production/camel/content: ./ cache/

2014-03-06 Thread buildbot
Modified: websites/production/camel/content/camel-2122-release.html
==
--- websites/production/camel/content/camel-2122-release.html (original)
+++ websites/production/camel/content/camel-2122-release.html Thu Mar  6 
22:18:49 2014
@@ -87,14 +87,14 @@
 tr
 td valign=top width=100%
 div class=wiki-content maincontenth1 
id=Camel2.12.2Release-Camel2.12.2releaseCamel 2.12.2 release/h1div 
style=padding-right:20px;float:left;margin-left:-20px;
-pspan class=image-wrap style=img 
src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; 
style=border: 0px solid black/span/p/divdiv 
style=min-height:200px/divh2 id=Camel2.12.2Release-NewandNoteworthyNew 
and Noteworthy/h2pWelcome to the 2.12.2 release which is mainly a bug fix 
release with 145 issues resolved../ppFor more details see the a 
shape=rect class=external-link 
href=https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311211amp;version=12325018;JIRA
 tickets/a/ph2 id=Camel2.12.2Release-KnownIssuesKnown 
Issues/h2ulliSee a shape=rect href=camel-2120-release.htmlCamel 
2.12.0 Release/a/li/ulh2 
id=Camel2.12.2Release-ImportantchangestoconsiderwhenupgradingImportant 
changes to consider when upgrading/h2ulliSee a shape=rect 
href=camel-2120-release.htmlCamel 2.12.0 Release/a/li/ulh2 
id=Camel2.12.2Release-NoticeNotice/h2ulliSee a shape=rect 
href=camel-
 2120-release.htmlCamel 2.12.0 Release/a/li/ulh2 
id=Camel2.12.2Release-GettingtheDistributionsGetting the 
Distributions/h2h3 id=Camel2.12.2Release-BinaryDistributionsBinary 
Distributions/h3div class=table-wraptable 
class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceThpDescription/p/thth colspan=1 rowspan=1 
class=confluenceThpDownload Link/p/thth colspan=1 rowspan=1 
class=confluenceThpPGP Signature file of download/p/th/trtrtd 
colspan=1 rowspan=1 class=confluenceTdpWindows 
Distribution/p/tdtd colspan=1 rowspan=1 class=confluenceTdpa 
shape=rect class=external-link 
href=http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.12.2/apache-camel-2.12.2.zip;apache-camel-2.12.2.zip/a/p/tdtd
 colspan=1 rowspan=1 class=confluenceTdpa shape=rect 
class=external-link 
href=http://www.apache.org/dist/camel/apache-camel/2.12.2/apache-camel-2.12.2.zip.asc
 apache-camel-2.12.2.zip.asc/a/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpUnix/Linux/Cygwin Distribution/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpa shape=rect class=external-link 
href=http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.12.2/apache-camel-2.12.2.tar.gz;apache-camel-2.12.2.tar.gz/a/p/tdtd
 colspan=1 rowspan=1 class=confluenceTdpa shape=rect 
class=external-link 
href=http://www.apache.org/dist/camel/apache-camel/2.12.2/apache-camel-2.12.2.tar.gz.asc;apache-camel-2.12.2.tar.gz.asc/a/p/td/tr/tbody/table/div
div class=aui-message hint shadowed information-macro
+pspan class=image-wrap style=img 
src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; 
style=border: 0px solid black/span/p/divdiv 
style=min-height:200px/divh2 id=Camel2.12.2Release-NewandNoteworthyNew 
and Noteworthy/h2pWelcome to the 2.12.2 release which is mainly a bug fix 
release with 145 issues resolved../ppFor more details see the a 
shape=rect class=external-link 
href=https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311211amp;version=12325018;JIRA
 tickets/a/ph2 id=Camel2.12.2Release-KnownIssuesKnown 
Issues/h2ulliSee a shape=rect href=camel-2120-release.htmlCamel 
2.12.0 Release/a/li/ulh2 
id=Camel2.12.2Release-ImportantchangestoconsiderwhenupgradingImportant 
changes to consider when upgrading/h2ulliSee a shape=rect 
href=camel-2120-release.htmlCamel 2.12.0 Release/a/li/ulh2 
id=Camel2.12.2Release-NoticeNotice/h2ulliSee a shape=rect 
href=camel-
 2120-release.htmlCamel 2.12.0 Release/a/li/ulh2 
id=Camel2.12.2Release-GettingtheDistributionsGetting the 
Distributions/h2h3 id=Camel2.12.2Release-BinaryDistributionsBinary 
Distributions/h3div class=table-wraptable 
class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceThpDescription/p/thth colspan=1 rowspan=1 
class=confluenceThpDownload Link/p/thth colspan=1 rowspan=1 
class=confluenceThpPGP Signature file of download/p/th/trtrtd 
colspan=1 rowspan=1 class=confluenceTdpWindows 
Distribution/p/tdtd colspan=1 rowspan=1 class=confluenceTdpa 
shape=rect class=external-link 
href=http://archive.apache.org/dist/camel/apache-camel/2.12.2/apache-camel-2.12.2.zip;apache-camel-2.12.2.zip/a/p/tdtd
 colspan=1 rowspan=1 class=confluenceTdpa shape=rect 
class=external-link 
href=http://archive.apache.org/dist/camel/apache-camel/2.12.2/apache-camel-2.12.2.zip.asc;
 apache-camel-2.12.2.zip.asc/a/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpUnix/Linux/Cygwin Distribution/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpa shape=rect class=external-link 

[2/2] git commit: Added a warning log when we get the exception from xmlrpc server

2014-03-06 Thread ningjiang
Added a warning log when we get the exception from xmlrpc server


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/11559611
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/11559611
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/11559611

Branch: refs/heads/master
Commit: 11559611b43cc7e58c5bdfad42935b1c0dece8c8
Parents: 44cad62
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Mar 7 11:16:34 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Mar 7 11:17:53 2014 +0800

--
 .../camel/component/xmlrpc/XmlRpcProducer.java | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/11559611/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcProducer.java
--
diff --git 
a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcProducer.java
 
b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcProducer.java
index 04be300..1dd2c8b 100644
--- 
a/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcProducer.java
+++ 
b/components/camel-xmlrpc/src/main/java/org/apache/camel/component/xmlrpc/XmlRpcProducer.java
@@ -44,12 +44,17 @@ public class XmlRpcProducer extends DefaultProducer 
implements AsyncProcessor {
 LOG.trace(Process exchange: {} in the sync way., exchange);
 Message in = exchange.getIn();
 String operationName = in.getHeader(XmlRpcConstants.METHOD_NAME, 
String.class);
-//TODO need to use the binding to handle the requests
-Object result = client.execute(operationName, in.getBody(List.class));
-//TODO what if the request is one way operation
-// copy the in message header to the out message
-exchange.getOut().getHeaders().putAll(exchange.getIn().getHeaders());
-exchange.getOut().setBody(result);
+try {
+//TODO need to use the binding to handle the requests
+Object result = client.execute(operationName, 
in.getBody(List.class));
+//TODO what if the request is one way operation
+// copy the in message header to the out message
+
exchange.getOut().getHeaders().putAll(exchange.getIn().getHeaders());
+exchange.getOut().setBody(result);
+} catch (Exception ex) {
+LOG.warn(Got an exception {0} when invoke the XMLRPC service, 
ex);
+exchange.setException(ex);
+}
 }
 
 public boolean process(Exchange exchange, AsyncCallback callback) {



[1/2] git commit: CAMEL-7277 camel-ssh should close the session when execution is finished.

2014-03-06 Thread ningjiang
Repository: camel
Updated Branches:
  refs/heads/master 44cad623a - 1b0f11626


CAMEL-7277 camel-ssh should close the session when execution is finished.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1b0f1162
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1b0f1162
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1b0f1162

Branch: refs/heads/master
Commit: 1b0f116267fad8830069874b627d1f2aa5bf3eaa
Parents: 1155961
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Mar 7 11:17:34 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Mar 7 11:17:53 2014 +0800

--
 .../apache/camel/component/ssh/SshEndpoint.java | 109 +++
 1 file changed, 61 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1b0f1162/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
--
diff --git 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
index 2465e96..b5bd60e 100644
--- 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
+++ 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
@@ -98,55 +98,68 @@ public class SshEndpoint extends ScheduledPollEndpoint {
 
 log.debug(Connected to {}:{}, getHost(), getPort());
 
-AuthFuture authResult;
-ClientSession session = connectFuture.getSession();
-
-KeyPairProvider keyPairProvider;
-final String certResource = getCertResource();
-if (certResource != null) {
-log.debug(Attempting to authenticate using ResourceKey '{}'..., 
certResource);
-keyPairProvider = new ResourceHelperKeyPairProvider(new 
String[]{certResource}, getCamelContext().getClassResolver());
-} else {
-keyPairProvider = getKeyPairProvider();
+ClientChannel channel = null;
+ClientSession session = null;
+
+try {
+AuthFuture authResult;
+session = connectFuture.getSession();
+
+KeyPairProvider keyPairProvider;
+final String certResource = getCertResource();
+if (certResource != null) {
+log.debug(Attempting to authenticate using ResourceKey 
'{}'..., certResource);
+keyPairProvider = new ResourceHelperKeyPairProvider(new 
String[]{certResource}, getCamelContext().getClassResolver());
+} else {
+keyPairProvider = getKeyPairProvider();
+}
+
+if (keyPairProvider != null) {
+log.debug(Attempting to authenticate username '{}' using 
Key..., getUsername());
+KeyPair pair = keyPairProvider.loadKey(getKeyType());
+authResult = session.authPublicKey(getUsername(), pair);
+} else {
+log.debug(Attempting to authenticate username '{}' using 
Password..., getUsername());
+authResult = session.authPassword(getUsername(), 
getPassword());
+}
+
+authResult.await(getTimeout());
+
+if (!authResult.isDone() || authResult.isFailure()) {
+log.debug(Failed to authenticate);
+throw new RuntimeCamelException(Failed to authenticate 
username  + getUsername());
+}
+
+channel = session.createChannel(ClientChannel.CHANNEL_EXEC, 
command);
+
+ByteArrayInputStream in = new ByteArrayInputStream(new byte[]{0});
+channel.setIn(in);
+
+ByteArrayOutputStream out = new ByteArrayOutputStream();
+channel.setOut(out);
+
+ByteArrayOutputStream err = new ByteArrayOutputStream();
+channel.setErr(err);
+OpenFuture openFuture = channel.open();
+openFuture.await(getTimeout());
+if (openFuture.isOpened()) {
+channel.waitFor(ClientChannel.CLOSED, 0);
+result = new SshResult(command, channel.getExitStatus(),
+new ByteArrayInputStream(out.toByteArray()),
+new ByteArrayInputStream(err.toByteArray()));
+
+}
+return result;
+} finally {
+if (channel != null) {
+channel.close(true);
+}
+// need to make sure the session is closed 
+if (session != null) {
+session.close(false);
+}
 }
-
-if (keyPairProvider != null) {
-log.debug(Attempting to authenticate username '{}' using Key..., 

[2/2] git commit: CAMEL-7277 camel-ssh should close the session when execution is finished.

2014-03-06 Thread ningjiang
CAMEL-7277 camel-ssh should close the session when execution is finished.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5d019355
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5d019355
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5d019355

Branch: refs/heads/camel-2.11.x
Commit: 5d0193555169bf8c940b64683be5645cd80e3fde
Parents: d26d7c5
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Mar 7 11:17:34 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Mar 7 11:22:47 2014 +0800

--
 .../apache/camel/component/ssh/SshEndpoint.java | 109 +++
 1 file changed, 61 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5d019355/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
--
diff --git 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
index e107009..f80f7d5 100644
--- 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
+++ 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
@@ -94,55 +94,68 @@ public class SshEndpoint extends ScheduledPollEndpoint {
 
 log.debug(Connected to {}:{}, getHost(), getPort());
 
-AuthFuture authResult;
-ClientSession session = connectFuture.getSession();
-
-KeyPairProvider keyPairProvider;
-final String certResource = getCertResource();
-if (certResource != null) {
-log.debug(Attempting to authenticate using ResourceKey '{}'..., 
certResource);
-keyPairProvider = new ResourceHelperKeyPairProvider(new 
String[]{certResource}, getCamelContext().getClassResolver());
-} else {
-keyPairProvider = getKeyPairProvider();
+ClientChannel channel = null;
+ClientSession session = null;
+
+try {
+AuthFuture authResult;
+session = connectFuture.getSession();
+
+KeyPairProvider keyPairProvider;
+final String certResource = getCertResource();
+if (certResource != null) {
+log.debug(Attempting to authenticate using ResourceKey 
'{}'..., certResource);
+keyPairProvider = new ResourceHelperKeyPairProvider(new 
String[]{certResource}, getCamelContext().getClassResolver());
+} else {
+keyPairProvider = getKeyPairProvider();
+}
+
+if (keyPairProvider != null) {
+log.debug(Attempting to authenticate username '{}' using 
Key..., getUsername());
+KeyPair pair = keyPairProvider.loadKey(getKeyType());
+authResult = session.authPublicKey(getUsername(), pair);
+} else {
+log.debug(Attempting to authenticate username '{}' using 
Password..., getUsername());
+authResult = session.authPassword(getUsername(), 
getPassword());
+}
+
+authResult.await(getTimeout());
+
+if (!authResult.isDone() || authResult.isFailure()) {
+log.debug(Failed to authenticate);
+throw new RuntimeCamelException(Failed to authenticate 
username  + getUsername());
+}
+
+channel = session.createChannel(ClientChannel.CHANNEL_EXEC, 
command);
+
+ByteArrayInputStream in = new ByteArrayInputStream(new byte[]{0});
+channel.setIn(in);
+
+ByteArrayOutputStream out = new ByteArrayOutputStream();
+channel.setOut(out);
+
+ByteArrayOutputStream err = new ByteArrayOutputStream();
+channel.setErr(err);
+OpenFuture openFuture = channel.open();
+openFuture.await(getTimeout());
+if (openFuture.isOpened()) {
+channel.waitFor(ClientChannel.CLOSED, 0);
+result = new SshResult(command, channel.getExitStatus(),
+new ByteArrayInputStream(out.toByteArray()),
+new ByteArrayInputStream(err.toByteArray()));
+
+}
+return result;
+} finally {
+if (channel != null) {
+channel.close(true);
+}
+// need to make sure the session is closed 
+if (session != null) {
+session.close(false);
+}
 }
-
-if (keyPairProvider != null) {
-log.debug(Attempting to authenticate username '{}' using Key..., 
getUsername());
-KeyPair pair = keyPairProvider.loadKey(getKeyType());
- 

[1/2] git commit: CAMEL-7277 camel-ssh should close the session when execution is finished.

2014-03-06 Thread ningjiang
Repository: camel
Updated Branches:
  refs/heads/camel-2.11.x d26d7c52f - 5d0193555
  refs/heads/camel-2.12.x 3cbc7fc69 - 9e71d8ace


CAMEL-7277 camel-ssh should close the session when execution is finished.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9e71d8ac
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9e71d8ac
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9e71d8ac

Branch: refs/heads/camel-2.12.x
Commit: 9e71d8ace9db8f1b9313e3d1832b16648d42f258
Parents: 3cbc7fc
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Mar 7 11:17:34 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Mar 7 11:22:38 2014 +0800

--
 .../apache/camel/component/ssh/SshEndpoint.java | 109 +++
 1 file changed, 61 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/9e71d8ac/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
--
diff --git 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
index 2465e96..b5bd60e 100644
--- 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
+++ 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshEndpoint.java
@@ -98,55 +98,68 @@ public class SshEndpoint extends ScheduledPollEndpoint {
 
 log.debug(Connected to {}:{}, getHost(), getPort());
 
-AuthFuture authResult;
-ClientSession session = connectFuture.getSession();
-
-KeyPairProvider keyPairProvider;
-final String certResource = getCertResource();
-if (certResource != null) {
-log.debug(Attempting to authenticate using ResourceKey '{}'..., 
certResource);
-keyPairProvider = new ResourceHelperKeyPairProvider(new 
String[]{certResource}, getCamelContext().getClassResolver());
-} else {
-keyPairProvider = getKeyPairProvider();
+ClientChannel channel = null;
+ClientSession session = null;
+
+try {
+AuthFuture authResult;
+session = connectFuture.getSession();
+
+KeyPairProvider keyPairProvider;
+final String certResource = getCertResource();
+if (certResource != null) {
+log.debug(Attempting to authenticate using ResourceKey 
'{}'..., certResource);
+keyPairProvider = new ResourceHelperKeyPairProvider(new 
String[]{certResource}, getCamelContext().getClassResolver());
+} else {
+keyPairProvider = getKeyPairProvider();
+}
+
+if (keyPairProvider != null) {
+log.debug(Attempting to authenticate username '{}' using 
Key..., getUsername());
+KeyPair pair = keyPairProvider.loadKey(getKeyType());
+authResult = session.authPublicKey(getUsername(), pair);
+} else {
+log.debug(Attempting to authenticate username '{}' using 
Password..., getUsername());
+authResult = session.authPassword(getUsername(), 
getPassword());
+}
+
+authResult.await(getTimeout());
+
+if (!authResult.isDone() || authResult.isFailure()) {
+log.debug(Failed to authenticate);
+throw new RuntimeCamelException(Failed to authenticate 
username  + getUsername());
+}
+
+channel = session.createChannel(ClientChannel.CHANNEL_EXEC, 
command);
+
+ByteArrayInputStream in = new ByteArrayInputStream(new byte[]{0});
+channel.setIn(in);
+
+ByteArrayOutputStream out = new ByteArrayOutputStream();
+channel.setOut(out);
+
+ByteArrayOutputStream err = new ByteArrayOutputStream();
+channel.setErr(err);
+OpenFuture openFuture = channel.open();
+openFuture.await(getTimeout());
+if (openFuture.isOpened()) {
+channel.waitFor(ClientChannel.CLOSED, 0);
+result = new SshResult(command, channel.getExitStatus(),
+new ByteArrayInputStream(out.toByteArray()),
+new ByteArrayInputStream(err.toByteArray()));
+
+}
+return result;
+} finally {
+if (channel != null) {
+channel.close(true);
+}
+// need to make sure the session is closed 
+if (session != null) {
+session.close(false);
+}
 }
-
-if (keyPairProvider != null) {
-

[CONF] Apache Camel Camel 2.10.2 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.2 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.2.zip  
  apache-camel-2.10.2.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.2.tar.gz  
  apache-camel-2.10.2.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.10.3 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.3 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.3.zip  
  apache-camel-2.10.3.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.3.tar.gz  
  apache-camel-2.10.3.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.10.4 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.4 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.4.zip  
  apache-camel-2.10.4.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.4.tar.gz  
  apache-camel-2.10.4.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.10.5 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.5 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.5.zip  
  apache-camel-2.10.5.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.5.tar.gz  
  apache-camel-2.10.5.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.10.6 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.6 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.6.zip  
  apache-camel-2.10.6.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.6.tar.gz  
  apache-camel-2.10.6.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...





[CONF] Apache Camel Camel 2.10.7 Release

2014-03-06 Thread Christian Mueller (Confluence)














  


Christian Mueller edited the page:
 


Camel 2.10.7 Release   






...




 Description 
 Download Link 
 PGP Signature file of download 


 Windows Distribution 
  apache-camel-2.10.7.zip  
  apache-camel-2.10.7.zip.asc  


 Unix/Linux/Cygwin Distribution 
  apache-camel-2.10.7.tar.gz  
  apache-camel-2.10.7.tar.gz.asc  







 Info








title
The above URLs use redirection


 




 The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox  



...