svn commit: r885345 - /camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TransactedDSLTest.java
Author: davsclaus Date: Mon Nov 30 08:03:30 2009 New Revision: 885345 URL: http://svn.apache.org/viewvc?rev=885345view=rev Log: Fixed unit test because of rev 885243 Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TransactedDSLTest.java Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TransactedDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TransactedDSLTest.java?rev=885345r1=885344r2=885345view=diff == --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TransactedDSLTest.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TransactedDSLTest.java Mon Nov 30 08:03:30 2009 @@ -14,20 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.camel.web.groovy; import org.junit.Test; -/** - * - */ public class TransactedDSLTest extends GroovyRendererTestSupport { @Test public void testTransacted() throws Exception { String dsl = from(\direct:start\).transacted(\myTransacted\).to(\mock:result\); -String expected = from(\direct:start\).policy(\myTransacted\).to(\mock:result\); +String expected = from(\direct:start\).transacted(\myTransacted\).to(\mock:result\); assertEquals(expected, render(dsl)); } @@ -35,7 +31,7 @@ @Test public void testTransactedWithPolicy() throws Exception { String dsl = from(\direct:start\).transacted().policy(\myPolicy\).to(\mock:result\); -String expected = from(\direct:start\).policy().policy(\myPolicy\).to(\mock:result\); +String expected = from(\direct:start\).transacted().policy(\myPolicy\).to(\mock:result\); assertEquals(expected, render(dsl)); }
svn commit: r885364 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/processor/aggregate/ components/camel-amqp/src/test/java/org/apache/camel/component/amqp/
Author: davsclaus Date: Mon Nov 30 09:33:18 2009 New Revision: 885364 URL: http://svn.apache.org/viewvc?rev=885364view=rev Log: Fixed potential NPE in AggregationStrategy and updated its javadoc. Disabled AMQP testing as testing it is a bit unstable. Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseLatestAggregationStrategy.java camel/trunk/components/camel-amqp/src/test/java/org/apache/camel/component/amqp/AMQPRouteTest.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java?rev=885364r1=885363r2=885364view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategy.java Mon Nov 30 09:33:18 2009 @@ -28,9 +28,12 @@ * or remove some headers. And a more common use case is for instance to count some values from the body payload. That * could be to sum up a total amount etc. * p/ - * Possible implementations include performing some kind of combining or delta - * processing, such as adding line items together into an invoice or just using - * the newest exchange and removing old exchanges such as for state tracking or + * It is possible that ttnewExchange/tt is ttnull/tt which could happen if there was no data possible + * to acquire. Such as when using a {...@link org.apache.camel.processor.PollEnricher} to poll from a JMS queue which + * is empty and a timeout was set. + * p/ + * Possible implementations include performing some kind of combining or delta processing, such as adding line items + * together into an invoice or just using the newest exchange and removing old exchanges such as for state tracking or * market data prices; where old values are of little use. * * @version $Revision$ @@ -41,7 +44,7 @@ * Aggregates an old and new exchange together to create a single combined exchange * * @param oldExchange the oldest exchange (is ttnull/tt on first aggregation as we only have the new exchange) - * @param newExchange the newest exchange + * @param newExchange the newest exchange (can be ttnull/tt if there was no data possible to acquire) * @return a combined composite of the two exchanges */ Exchange aggregate(Exchange oldExchange, Exchange newExchange); Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java?rev=885364r1=885363r2=885364view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedExchangeAggregationStrategy.java Mon Nov 30 09:33:18 2009 @@ -44,7 +44,9 @@ list = oldExchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class); } -list.add(newExchange); +if (newExchange != null) { +list.add(newExchange); +} return answer; } Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseLatestAggregationStrategy.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseLatestAggregationStrategy.java?rev=885364r1=885363r2=885364view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseLatestAggregationStrategy.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseLatestAggregationStrategy.java Mon Nov 30 09:33:18 2009 @@ -28,6 +28,9 @@ public class UseLatestAggregationStrategy implements AggregationStrategy { public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { +if (newExchange == null) { +return oldExchange; +} newExchange.setException(checkException(oldExchange, newExchange)); return newExchange; } @@ -44,6 +47,6 @@ @Override public String toString() { -return useLatestAggregationStrategy; +return UseLatestAggregationStrategy; } } Modified:
svn commit: r885380 - in /camel/trunk/components/camel-jetty/src: main/java/org/apache/camel/component/jetty/ test/java/org/apache/camel/component/jetty/jettyproducer/
Author: davsclaus Date: Mon Nov 30 11:27:40 2009 New Revision: 885380 URL: http://svn.apache.org/viewvc?rev=885380view=rev Log: CAMEL-2238: Fixed Jetty HTTP producer in sync mode blocking if connection failure. Added: camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerConnectionFailureTest.java - copied, changed from r885344, camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerGetWithParamAsExchangeHeaderTest.java Modified: camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerGetWithParamAsExchangeHeaderTest.java Modified: camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java?rev=885380r1=885379r2=885380view=diff == --- camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java (original) +++ camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java Mon Nov 30 11:27:40 2009 @@ -21,6 +21,7 @@ import java.io.UnsupportedEncodingException; import java.util.LinkedHashMap; import java.util.Map; +import java.util.concurrent.CountDownLatch; import org.apache.camel.AsyncCallback; import org.apache.camel.CamelExchangeException; @@ -49,6 +50,7 @@ private volatile AsyncCallback callback; private volatile JettyHttpBinding jettyBinding; private volatile HttpClient client; +private final CountDownLatch done = new CountDownLatch(1); public JettyContentExchange(Exchange exchange, JettyHttpBinding jettyBinding, HttpClient client) { super(true); // keep headers by default @@ -77,23 +79,44 @@ } @Override -protected void onResponseComplete() { -doTaskCompleted(); +protected void onResponseComplete() throws IOException { +try { +super.onResponseComplete(); +} finally { +doTaskCompleted(); +} } @Override protected void onExpire() { -doTaskCompleted(); +try { +super.onExpire(); +} finally { +doTaskCompleted(); +} } @Override protected void onException(Throwable ex) { -doTaskCompleted(ex); +try { +super.onException(ex); +} finally { +doTaskCompleted(ex); +} } @Override protected void onConnectionFailed(Throwable ex) { -doTaskCompleted(ex); +try { +super.onConnectionFailed(ex); +} finally { +doTaskCompleted(ex); +} +} + +protected int waitForDoneOrFailure() throws InterruptedException { +done.await(); +return getStatus(); } public MapString, String getHeaders() { @@ -110,6 +133,9 @@ } protected void doTaskCompleted() { +// make sure to lower the latch +done.countDown(); + if (callback == null) { // this is only for the async callback return; @@ -143,6 +169,9 @@ } protected void doTaskCompleted(Throwable ex) { +// make sure to lower the latch +done.countDown(); + // some kind of other error exchange.setException(new CamelExchangeException(JettyClient failed cause by: + ex.getMessage(), exchange, ex)); Modified: camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java?rev=885380r1=885379r2=885380view=diff == --- camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java (original) +++ camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java Mon Nov 30 11:27:40 2009 @@ -88,8 +88,12 @@ protected void sendSynchronous(Exchange exchange, HttpClient client, JettyContentExchange httpExchange) throws Exception { doSendExchange(client, httpExchange); +if (LOG.isTraceEnabled()) { +LOG.trace(Waiting for HTTP exchange to be done); +} // we send synchronous so wait for it to be done -int exchangeState = httpExchange.waitForDone(); +// must use our own
svn commit: r885400 - /camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
Author: davsclaus Date: Mon Nov 30 12:41:36 2009 New Revision: 885400 URL: http://svn.apache.org/viewvc?rev=885400view=rev Log: Using try catch for event notifier in UoW done to ensure synchronizations always will be invoked if event notifier failed, such as if using a custom notifier and it fails. Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java?rev=885400r1=885399r2=885400view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java Mon Nov 30 12:41:36 2009 @@ -110,10 +110,15 @@ boolean failed = exchange.isFailed(); // fire event to signal the exchange is done -if (failed) { -EventHelper.notifyExchangeFailed(exchange.getContext(), exchange); -} else { -EventHelper.notifyExchangeDone(exchange.getContext(), exchange); +try { +if (failed) { +EventHelper.notifyExchangeFailed(exchange.getContext(), exchange); +} else { +EventHelper.notifyExchangeDone(exchange.getContext(), exchange); +} +} catch (Exception e) { +// must catch exceptions to ensure synchronizations is also invoked +LOG.warn(Exception occurred during event notification. This exception will be ignored., e); } if (synchronizations != null !synchronizations.isEmpty()) { @@ -127,7 +132,7 @@ } } catch (Exception e) { // must catch exceptions to ensure all synchronizations have a chance to run -LOG.warn(Exception occurred during onCompletion. This exception will be ignored: , e); +LOG.warn(Exception occurred during onCompletion. This exception will be ignored., e); } } } @@ -136,7 +141,6 @@ if (exchange.getContext() != null) { exchange.getContext().getInflightRepository().remove(exchange); } - } public String getId() {
svn commit: r885657 - /camel/trunk/pom.xml
Author: hadrian Date: Tue Dec 1 02:38:06 2009 New Revision: 885657 URL: http://svn.apache.org/viewvc?rev=885657view=rev Log: CAMEL-2240. Downgrade javadoc to ver 2.5 Modified: camel/trunk/pom.xml Modified: camel/trunk/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/pom.xml?rev=885657r1=885656r2=885657view=diff == --- camel/trunk/pom.xml (original) +++ camel/trunk/pom.xml Tue Dec 1 02:38:06 2009 @@ -347,7 +347,7 @@ plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId - version2.6/version + version2.5/version /plugin plugin groupIdorg.codehaus.mojo/groupId @@ -437,7 +437,7 @@ plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId -version2.6/version +version2.5/version configuration links linkhttp://java.sun.com/j2se/1.5.0/docs/api//link
svn commit: r885670 [2/2] - in /camel/trunk: ./ apache-camel/ buildingtools/ camel-core/ components/ components/camel-amqp/ components/camel-atom/ components/camel-bam/ components/camel-bindy/ compone
Modified: camel/trunk/tooling/maven/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/pom.xml?rev=885670r1=885669r2=885670view=diff == --- camel/trunk/tooling/maven/pom.xml (original) +++ camel/trunk/tooling/maven/pom.xml Tue Dec 1 05:03:46 2009 @@ -22,7 +22,7 @@ parent groupIdorg.apache.camel/groupId artifactIdcamel-parent/artifactId -version2.1-SNAPSHOT/version +version2.1.0/version /parent artifactIdmaven-plugins/artifactId Modified: camel/trunk/tooling/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/tooling/pom.xml?rev=885670r1=885669r2=885670view=diff == --- camel/trunk/tooling/pom.xml (original) +++ camel/trunk/tooling/pom.xml Tue Dec 1 05:03:46 2009 @@ -21,7 +21,7 @@ parent groupIdorg.apache.camel/groupId artifactIdcamel-parent/artifactId -version2.1-SNAPSHOT/version +version2.1.0/version /parent artifactIdtooling/artifactId
svn commit: r885671 - /camel/tags/camel-2.1.0/
Author: hadrian Date: Tue Dec 1 05:06:21 2009 New Revision: 885671 URL: http://svn.apache.org/viewvc?rev=885671view=rev Log: Camel 2.1.0 Release Added: camel/tags/camel-2.1.0/ - copied from r885670, camel/trunk/
[CONF] Apache Camel Component List
Component List Page edited by Claus Ibsen Component / ArtifactId / URI Description ActiveMQ / activemq-camel activemq:[topic:]destinationName For JMS Messaging with Apache ActiveMQ ActiveMQ Journal / activemq-core activemq.journal:directory-on-filesystem Uses ActiveMQ's fast disk journaling implementation to store message bodies in a rolling log file AMQP / camel-amqp amqp:[topic:]destinationName For Messaging with AMQP protocol Atom / camel-atom atom:uri Working with Apache Abdera for atom integration, such as consuming an atom feed. Bean / camel-core bean:beanName[?method=someMethod] Uses the Bean Binding to bind message exchanges to beans in the Registry. Is also used for exposing and invoking POJO (Plain Old Java Objects). Browse / camel-core browse:someName Provdes a simple BrowsableEndpoint which can be useful for testing, visualisation tools or debugging. The exchanges sent to the endpoint are all available to be browsed. Cache / camel-cache cache://cachename[?options] The cache component facilitates creation of caching endpoints and processors using EHCache as the cache implementation. Cometd / camel-cometd cometd://host:port/channelname Used to deliver messages using the jetty cometd implementation of the bayeux protocol CXF / camel-cxf cxf:address[?serviceClass=...] Working with Apache CXF for web services integration CXFRS / camel-cxf cxfrs:address[?resourcesClasses=...] Working with Apache CXF for REST services integration DataSet / camel-core dataset:name For load soak testing the DataSet provides a way to create huge numbers of messages for sending to Components or asserting that they are consumed correctly Direct / camel-core direct:name Synchronous call to another endpoint Esper / camel-esper in camel-extra esper:name Working with the Esper Library for Event Stream Processing Event / camel-spring event://default spring-event://default Working with Spring ApplicationEvents File / camel-core file://nameOfFileOrDirectory Sending messages to a file or polling a file or directory. Camel 1.x use this link File. Flatpack / camel-flatpack flatpack:[fixed|delim]:configFile Processing fixed width or delimited files or messages using the FlatPack library Freemarker / camel-freemarker freemarker:someTemplateResource Generates a response using a Freemarker template FTP / camel-ftp ftp://host[:port]/fileName Sending and receiving files over FTP. Camel 1.x use this link FTP. GHttp / camel-gae ghttp://hostname[:port][/path][?options] ghttp:///path[?options] Provides connectivity to the URL fetch service of Google App Engine but can also be used to receive messages from servlets. See also Camel Components for Google App Engine. GTask / camel-gae gtask://queue-name supports asynchronous message processing on Google App Engine by using the task queueing service as message queue. See also Camel Components for Google App Engine. GMail / camel-gae gmail://u...@gmail.com[?options] gmail://u...@googlemail.com[?options] Supports sending of emails via the mail service of Google App Engine. See also Camel Components for Google App Engine. Hibernate / camel-hibernate in camel-extra hibernate://entityName For using a database as a queue via the Hibernate library HL7 / camel-hl7 mina:tcp://hostname[:port] For working with the HL7 MLLP protocol and the HL7 model using the HAPI library HTTP / camel-http http://hostname[:port] For calling out to external HTTP servers iBATIS / camel-ibatis ibatis://sqlOperationName Performs a query, poll, insert, update or delete in a relational database using Apache iBATIS IMap / camel-mail imap://hostname[:port] Receiving email using IMap IRC / camel-irc irc:host[:port]/#room For IRC communication JavaSpace / camel-javaspace javaspace:jini://host?spaceName=mySpace?... Sending and receiving messages through JavaSpace JBI / servicemix-camel jbi:serviceName For JBI integration such as working with Apache ServiceMix JCR / camel-jcr jcr://user:passw...@repository/path/to/node Storing a message in a JCR (JSR-170) compliant repository like Apache Jackrabbit JDBC / camel-jdbc jdbc:dataSourceName?options For performing JDBC queries and operations Jetty / camel-jetty jetty:url For exposing services over HTTP JMS / camel-jms jms:[topic:]destinationName Working with JMS providers JPA / camel-jpa jpa://entityName For using a database as a queue via the JPA specification for working with OpenJPA, Hibernate or TopLink JT/400 / camel-jt400 jt400://user:p...@system/path_to_dtaq For integrating with data queues on an AS/400 (aka System i, IBM i, i5, ...) system LDAP / camel-ldap
[CONF] Apache Camel Cometd
Cometd Page moved by Fintan Bolton From: Apache Camel Component List To: Apache Camel Cookbook Children moved Change Notification Preferences View Online | Add Comment
[CONF] Apache Camel CXFRS
CXFRS Page moved by willem jiang From: Apache Camel Component List To: Apache Camel Cookbook Children moved Change Notification Preferences View Online | Add Comment
[CONF] Apache Camel Cometd
Cometd Page moved by Claus Ibsen From: Apache Camel Cookbook To: Apache Camel Components Children moved Change Notification Preferences View Online | Add Comment
[CONF] Apache Camel CXFRS
CXFRS Page moved by Claus Ibsen From: Apache Camel Cookbook To: Apache Camel Components Children moved Change Notification Preferences View Online | Add Comment
[CONF] Apache Camel SERVLET
SERVLET Page moved by Claus Ibsen From: Apache Camel Component List To: Apache Camel Components Children moved Change Notification Preferences View Online | Add Comment
[CONF] Apache Camel NMR
NMR Page moved by Fintan Bolton From: Apache Camel To: Apache Camel Components Children moved Change Notification Preferences View Online | Add Comment