[CONF] Apache Camel MINA

2012-12-27 Thread confluence







MINA
Page edited by Claus Ibsen


 Changes (1)
 




...
Filters permit you to use some Mina Filters, such as {{SslFilter}}. You can also implement some customized filters. Please note that {{codec}} and {{logger}} are also implemented as Mina filters of type, {{IoFilter}}. Any filters you may define are appended to the end of the filter chain; that is, after {{codec}} and {{logger}}.  
{tip} If using the {{SslFilter}} you need to add the {{mina-filter-ssl}} JAR to the classpath. {tip}  
For instance, the example below will send a keep-alive message after 10 seconds of inactivity: {code:java} 
...


Full Content

MINA Component

The mina: component is a transport for working with Apache MINA

Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-mina/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



URI format



mina:tcp://hostname[:port][?options]
mina:udp://hostname[:port][?options]
mina:vm://hostname[:port][?options]


You can specify a codec in the Registry using the codec option. If you are using TCP and no codec is specified then the textline flag is used to determine if text line based codec or object serialization should be used instead. By default the object serialization is used.

For UDP if no codec is specified the default uses a basic ByteBuffer based codec.

The VM protocol is used as a direct forwarding mechanism in the same JVM. See the MINA VM-Pipe API documentation for details.

A Mina producer has a default timeout value of 30 seconds, while it waits for a response from the remote server.

In normal use, camel-mina only supports marshalling the body contentmessage headers and exchange properties are not sent.
However, the option, transferExchange, does allow you to transfer the exchange itself over the wire. See options below.

You can append query options to the URI in the following format, ?option=valueoption=value...

Options



 Option 
 Default Value 
 Description 


 codec 
 null 
 You can refer to a named ProtocolCodecFactory instance in your Registry such as your Spring ApplicationContext, which is then used for the marshalling. 


 codec 
 null 
 You must use the  notation to look up your codec in the Registry. For example, use myCodec to look up a bean with the id value, myCodec. 


 disconnect 
 false 
 Camel 2.3: Whether or not to disconnect(close) from Mina session right after use. Can be used for both consumer and producer. 


 textline 
 false 
 Only used for TCP. If no codec is specified, you can use this flag to indicate a text line based codec; if not specified or the value is false, then Object Serialization is assumed over TCP. 


 textlineDelimiter 
 DEFAULT 
 Only used for TCP and if textline=true. Sets the text line delimiter to use. Possible values are: DEFAULT, AUTO, WINDOWS, UNIX or MAC. If none provided, Camel will use DEFAULT. This delimiter is used to mark the end of text. 


 sync 
 true 
 You can configure the exchange pattern to be either InOnly (default) or InOut. Setting sync=true means a synchronous exchange (InOut), where the client can read the response from MINA (the exchange Out message). 


 lazySessionCreation 
 true 
 Sessions can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started. 


 timeout 
 3000 
 You can configure the timeout that specifies how long to wait for a response from a remote server. The timeout unit is in milliseconds, so 6 is 60 seconds. The timeout is only used for Mina producer. 


 encoding 
 JVM Default 
 You can configure the encoding (a charset name) to use for the TCP textline codec and the UDP protocol. If not provided, Camel will use the JVM default Charset. 


 transferExchange 
 false 
 Only used for TCP. You can transfer the exchange over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. 


 minaLogger 
 false 
 You can enable the Apache MINA logging filter. Apache MINA uses slf4j logging at INFO level to log all input and output. 


 filters 
 null 
 You can set a list of Mina IoFilters to register. The filters value must be one of the following:

	Camel 2.2: comma-separated list of bean references (e.g. filterBean1,#filterBean2) where each bean must be of type org.apache.mina.common.IoFilter.
	before Camel 2.2: a reference to a bean of type 

svn commit: r843970 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache mina.html

2012-12-27 Thread buildbot
Author: buildbot
Date: Thu Dec 27 09:24:48 2012
New Revision: 843970

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/mina.html

Modified: websites/production/camel/content/book-component-appendix.html
==
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Thu Dec 27 
09:24:48 2012
@@ -11133,6 +11133,8 @@ You can get the IoSession from the messa
 
 pFilters permit you to use some Mina Filters, such as ttSslFilter/tt. 
You can also implement some customized filters. Please note that ttcodec/tt 
and ttlogger/tt are also implemented as Mina filters of type, 
ttIoFilter/tt. Any filters you may define are appended to the end of the 
filter chain; that is, after ttcodec/tt and ttlogger/tt./p
 
+div class=panelMacrotable class=tipMacrocolgroup span=1col 
span=1 width=24col span=1/colgrouptrtd colspan=1 rowspan=1 
valign=topimg align=middle 
src=https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif; 
width=16 height=16 alt= border=0/tdtd colspan=1 rowspan=1If 
using the ttSslFilter/tt you need to add the ttmina-filter-ssl/tt JAR 
to the classpath./td/tr/table/div
+
 pFor instance, the example below will send a keep-alive message after 10 
seconds of inactivity:/p
 div class=code panel style=border-width: 1px;div class=codeContent 
panelContent
 pre class=code-java

Modified: websites/production/camel/content/book-in-one-page.html
==
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Thu Dec 27 09:24:48 
2012
@@ -31392,6 +31392,8 @@ You can get the IoSession from the messa
 
 pFilters permit you to use some Mina Filters, such as ttSslFilter/tt. 
You can also implement some customized filters. Please note that ttcodec/tt 
and ttlogger/tt are also implemented as Mina filters of type, 
ttIoFilter/tt. Any filters you may define are appended to the end of the 
filter chain; that is, after ttcodec/tt and ttlogger/tt./p
 
+div class=panelMacrotable class=tipMacrocolgroup span=1col 
span=1 width=24col span=1/colgrouptrtd colspan=1 rowspan=1 
valign=topimg align=middle 
src=https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif; 
width=16 height=16 alt= border=0/tdtd colspan=1 rowspan=1If 
using the ttSslFilter/tt you need to add the ttmina-filter-ssl/tt JAR 
to the classpath./td/tr/table/div
+
 pFor instance, the example below will send a keep-alive message after 10 
seconds of inactivity:/p
 div class=code panel style=border-width: 1px;div class=codeContent 
panelContent
 pre class=code-java

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

Modified: websites/production/camel/content/mina.html
==
--- websites/production/camel/content/mina.html (original)
+++ websites/production/camel/content/mina.html Thu Dec 27 09:24:48 2012
@@ -262,6 +262,8 @@ You can get the IoSession from the messa
 
 pFilters permit you to use some Mina Filters, such as ttSslFilter/tt. 
You can also implement some customized filters. Please note that ttcodec/tt 
and ttlogger/tt are also implemented as Mina filters of type, 
ttIoFilter/tt. Any filters you may define are appended to the end of the 
filter chain; that is, after ttcodec/tt and ttlogger/tt./p
 
+div class=panelMacrotable class=tipMacrocolgroup span=1col 
span=1 width=24col span=1/colgrouptrtd colspan=1 rowspan=1 
valign=topimg align=middle 
src=https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif; 
width=16 height=16 alt= border=0/tdtd colspan=1 rowspan=1If 
using the ttSslFilter/tt you need to add the ttmina-filter-ssl/tt JAR 
to the classpath./td/tr/table/div
+
 pFor instance, the example below will send a keep-alive message after 10 
seconds of inactivity:/p
 div class=code panel style=border-width: 1px;div class=codeContent 
panelContent
 pre class=code-java




[CONF] Apache Camel Mail

2012-12-27 Thread confluence







Mail
Page edited by willem jiang


Comment:
CAMEL-5910


 Changes (1)
 




...
The preceding example uses a semicolon, {{;}}, as the separator character.  
h3. Get the Message ID of MimeMessage  *Since Camel 2.11* When using the MailProducer the send the mail to sever, you should be able to get the message id of the [MimeMessage|http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html] with the key {{CamelMailMessageId}} form the Camel message header.  
h3. Setting sender name and email  
...


Full Content

Mail Component

The mail component provides access to Email via Spring's Mail support and the underlying JavaMail system.

Maven users will need to add the following dependency to their pom.xml for this component:


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-mail/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency



Geronimo mail .jarWe have discovered that the geronimo mail .jar (v1.6) has a bug when polling mails with attachments. It cannot correctly identify the Content-Type. So, if you attach a .jpeg file to a mail and you poll it, the Content-Type is resolved as text/plain and not as image/jpeg. For that reason, we have added an org.apache.camel.component.ContentTypeResolver SPI interface which enables you to provide your own implementation and fix this bug by returning the correct Mime type based on the file name. So if the file name ends with jpeg/jpg, you can return image/jpeg.

You can set your custom resolver on the MailComponent instance or on the MailEndpoint instance.

POP3 or IMAPPOP3 has some limitations and end users are encouraged to use IMAP if possible.

Using mock-mail for testingYou can use a mock framework for unit testing, which allows you to test without the need for a real mail server. However you should remember to not include the mock-mail when you go into production or other environments where you need to send mails to a real mail server. Just the presence of the mock-javamail.jar on the classpath means that it will kick in and avoid sending the mails.

URI format

Mail endpoints can have one of the following URI formats (for the protocols, SMTP, POP3, or IMAP, respectively):



smtp://[username@]host[:port][?options]
pop3://[username@]host[:port][?options]
imap://[username@]host[:port][?options]



The mail component also supports secure variants of these protocols (layered over SSL). You can enable the secure protocols by adding s to the scheme:



smtps://[username@]host[:port][?options]
pop3s://[username@]host[:port][?options]
imaps://[username@]host[:port][?options]



You can append query options to the URI in the following format, ?option=valueoption=value...

Sample endpoints

Typically, you specify a URI with login credentials as follows (taking SMTP as an example):



smtp://[username@]host[:port][?password=somepwd]



Alternatively, it is possible to specify both the user name and the password as query options:



smtp://host[:port]?password=somepwdusername=someuser



For example:


smtp://mycompany.mailserver:30?password=tigerusername=scott



Default ports

Default port numbers are supported. If the port number is omitted, Camel determines the port number to use based on the protocol.



 Protocol 
 Default Port Number 


 SMTP 
 25 


 SMTPS 
 465 


 POP3 
 110 


 POP3S 
 995 


 IMAP 
 143 


 IMAPS 
 993 





Options



 Property 
 Default 
 Description 


 host 

 The host name or IP address to connect to. 


 port 
 See DefaultPorts 
 The TCP port number to connect on. 


 username 

 The user name on the email server. 


 password 
 null 
 The password on the email server. 


 ignoreUriScheme 
 false 
 If false, Camel uses the scheme to determine the transport protocol (POP, IMAP, SMTP etc.) 


 defaultEncoding 
 null 
 The default encoding to use for Mime Messages. 


 contentType 
 text/plain 
 The mail message content type. Use text/html for HTML mails. 


 folderName 
 INBOX 
 The folder to poll. 


 destination 
 username@host 
 @deprecated Use the to option instead. The TO recipients (receivers of the email). 


 to 
 username@host 
 The TO recipients (the receivers of the mail). Separate multiple email addresses with a comma. 


 replyTo 
 alias@host 
 As of Camel 2.8.4, 2.9.1, the Reply-To recipients (the receivers of the response mail). Separate multiple email addresses with a comma. 


 CC 
 null 
The CC recipients (the receivers of the mail). Separate multiple email addresses with a comma. 


 BCC 
 null 
 The BCC recipients (the receivers of the mail). Separate multiple email addresses with a comma. 


 from 
 camel@localhost 
 The FROM email address. 


 

svn commit: r843973 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache mail.html

2012-12-27 Thread buildbot
Author: buildbot
Date: Thu Dec 27 10:24:47 2012
New Revision: 843973

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/mail.html

Modified: websites/production/camel/content/book-component-appendix.html
==
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Thu Dec 27 
10:24:47 2012
@@ -10691,6 +10691,10 @@ template.sendBodyAndHeaders(span class=
 
 pThe preceding example uses a semicolon, tt;/tt, as the separator 
character./p
 
+h3a shape=rect 
name=BookComponentAppendix-GettheMessageIDofMimeMessage/aGet the Message 
ID of MimeMessage/h3
+
+pbSince Camel 2.11/b When using the MailProducer the send the mail to 
sever, you should be able to get the message id of the a shape=rect 
class=external-link 
href=http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html;
 rel=nofollowMimeMessage/a with the key ttCamelMailMessageId/tt form 
the Camel message header./p
+
 h3a shape=rect 
name=BookComponentAppendix-Settingsendernameandemail/aSetting sender name 
and email/h3
 
 pYou can specify recipients in the format, ttname lt;emailgt;/tt, to 
include both the name and the email address of the recipient./p

Modified: websites/production/camel/content/book-in-one-page.html
==
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Thu Dec 27 10:24:47 
2012
@@ -30950,6 +30950,10 @@ template.sendBodyAndHeaders(span class=
 
 pThe preceding example uses a semicolon, tt;/tt, as the separator 
character./p
 
+h3a shape=rect name=BookInOnePage-GettheMessageIDofMimeMessage/aGet 
the Message ID of MimeMessage/h3
+
+pbSince Camel 2.11/b When using the MailProducer the send the mail to 
sever, you should be able to get the message id of the a shape=rect 
class=external-link 
href=http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html;
 rel=nofollowMimeMessage/a with the key ttCamelMailMessageId/tt form 
the Camel message header./p
+
 h3a shape=rect name=BookInOnePage-Settingsendernameandemail/aSetting 
sender name and email/h3
 
 pYou can specify recipients in the format, ttname lt;emailgt;/tt, to 
include both the name and the email address of the recipient./p

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

Modified: websites/production/camel/content/mail.html
==
--- websites/production/camel/content/mail.html (original)
+++ websites/production/camel/content/mail.html Thu Dec 27 10:24:47 2012
@@ -258,6 +258,10 @@ template.sendBodyAndHeaders(span class=
 
 pThe preceding example uses a semicolon, tt;/tt, as the separator 
character./p
 
+h3a shape=rect name=Mail-GettheMessageIDofMimeMessage/aGet the 
Message ID of MimeMessage/h3
+
+pbSince Camel 2.11/b When using the MailProducer the send the mail to 
sever, you should be able to get the message id of the a shape=rect 
class=external-link 
href=http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html;
 rel=nofollowMimeMessage/a with the key ttCamelMailMessageId/tt form 
the Camel message header./p
+
 h3a shape=rect name=Mail-Settingsendernameandemail/aSetting sender 
name and email/h3
 
 pYou can specify recipients in the format, ttname lt;emailgt;/tt, to 
include both the name and the email address of the recipient./p




[CONF] Apache Camel User Stories

2012-12-27 Thread confluence







User Stories
Page edited by Claus Ibsen


 Changes (1)
 




...
| [Camel SMB|https://github.com/Redpill-Linpro/camel-smb] | This project is a Samba Camel component build on top of [JCIFS|http://jcifs.samba.org]. | | [camel-couchdb|https://github.com/sksamuel/camel-couchdb] | A Camel component for Apache CouchDB. | 
| [JRebel|http://zeroturnaround.com/software/jrebel] | JRebel now supports [reloading Camel routes|http://zeroturnaround.com/jrebel/jrebel-5-1-2-released-apache-camel-now-supported/] without any application server restarts. | 
{children} 


Full Content

User Stories

This page is intended as a place to collect user stories and feedback on Apache Camel. If you are using or have tried Apache Camel please add an entry or comment; or post to the Discussion Forums.




 Company or Project 
 Description 


 Apache ActiveMQ 
 Uses Camel to add Enterprise Integration Patterns support into the ActiveMQ broker. If you run an out of the box ActiveMQ broker, look in conf/activemq.xml and you'll see camelContext with some example routing rules. Can be used to bridge ActiveMQ with any of the camel Components. 


 Apache ServiceMix 
 Uses Camel as a routing engine as a JBI service unit for use either in JBI or OSGi to route between JBI endpoints. See the tutorial or example 


 Fuse Mediation Router 
 FuseSource provides a commercial distribution of Camel complete with additional features and support as well as improved documenation and samples. 


 Fuse ESB 
 FuseSource provides a commercial distribution of Apache ServiceMix which includes FUSE Mediation Router which is a distribution of Camel 


 Fuse IDE 
 FuseSource provides developer tooling for Camel, ServiceMix, and ActiveMQ. Fuse IDE for Camel is a graphical, Eclipse-based tool for integrating software components that works with Apache Camel or Fuse Mediation Router. 


 Grails 
 The Grails Camel Routing Plugin provides integration of Camel into Grails 


 Open ESB Camel SE 
 Provides a JBI Service Engine for Open ESB.  See the example using OpenESB and Fuji 


 SubRecord 
 Uses Camel for routing and EDA processing 


 Open eHealth Integration Platform 
 The Open eHealth Integration Platform (IPF) is an extension of the Apache Camel routing and mediation engine. It has an application programming layer based on the Groovy programming language and comes with comprehensive support for message processing and connecting systems in the eHealth domain. 


 Camel SOAP 
 Zero code WSDL based SOAP Client component for Apache Camel. 


 PrismTech 
 PrismTech Simplifies Systems Integration  SOA Connectivity with Release of Open Source OpenSplice DDS Connector for Apache Camel. 


 Axiom 
 Axiom is is a framework for testing integration scenarios and uses Apache Camel to interact with your integration stack. 


 Capital Region of Denmark 
 Chose to switch proprietary ESB to open source Apache Camel. 


 Akka 
 Akka uses Apache Camel to implement additional messaging interfaces for actors. Any Camel component can be used to send and receive messages from Akka actors. For details refer to the documentation of the akka-camel extension module.


 camel-msmq 
 A Camel Microsoft MQ component. 


 camel-cassandra 
 A Camel Cassandra component. 


 JBoss Drools 
 Drools integrates with Camel. 


 JBoss ESB 
 JBoss ESB integrates with Camel. 


 simple-dm 
 Simple Dynamic Module System for Maven integrates with Camel. 


 JOnAS Application Server 
 JOnAS Application Server integrates with Camel. 


 camel-oftp2 
 Neociclo provides an OFTP2 component for Apache Camel. 


 camel-jmx 
 Apache Camel component for consuming JMX Notifications. Part of Apache Camel since 2.6 see JMX 


 camel-beanstalk 
 Apache Camel component for beanstalk. 


 Active BAM 
 Web Console Business Activity Monitoring for ServiceMix, Camel and ActiveMQ. 


 camel-sns 
 The SNS component allows messages to be sent to or consumed from an Amazon Simple Notification Topic. 


 camel-social 
 The Camel Social component is a PoC to poll social data in a uniform way from social networks. 


 camel-apns 
 Camel component for Apple Push Notification service. Part of Apache Camel since 2.8, see APNS 


 Apache Hise 
 Apache Hise (Open Source Implementation of WS-Human-Task Specification) integrates with Camel. 


 Catify 
 Catify is build on top of proven software stack like Spring, Apache ActiveMQ, Apache Camel, Apache Felix and MongoDB. 


TouK
We are using Apache ServiceMix (both 3.x and 4.x) with Apache Camel, Apache ODE and Apache HISE as a middleware integration platform, with the biggest deployment for Play, mobile telco operator in Poland 


 camel-tika 
 Camel data format for Apache Tika 


 camel-mongodb 
 Camel idempotent consumer EIP using MongoDB. 


 

svn commit: r843979 - in /websites/production/camel/content: cache/main.pageCache user-stories.html

2012-12-27 Thread buildbot
Author: buildbot
Date: Thu Dec 27 12:18:03 2012
New Revision: 843979

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/user-stories.html

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

Modified: websites/production/camel/content/user-stories.html
==
--- websites/production/camel/content/user-stories.html (original)
+++ websites/production/camel/content/user-stories.html Thu Dec 27 12:18:03 2012
@@ -80,7 +80,7 @@
 pThis page is intended as a place to collect user stories and feedback on 
Apache Camel. If you are using or have tried Apache Camel please add an entry 
or comment; or post to the a shape=rect href=discussion-forums.html 
title=Discussion ForumsDiscussion Forums/a./p
 
 div class=table-wrap
-table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Company or Project /thth colspan=1 rowspan=1 
class=confluenceTh Description /th/trtrtd colspan=1 rowspan=1 
class=confluenceTd a shape=rect class=external-link 
href=http://activemq.apache.org/;Apache ActiveMQ/a /tdtd colspan=1 
rowspan=1 class=confluenceTd Uses Camel to add a shape=rect 
href=enterprise-integration-patterns.html title=Enterprise Integration 
PatternsEnterprise Integration Patterns/a support into the a shape=rect 
class=external-link 
href=http://activemq.apache.org/enterprise-integration-patterns.html;ActiveMQ 
broker/a. If you run an out of the box ActiveMQ broker, look in 
conf/activemq.xml and you'll see lt;camelContextgt; with some example routing 
rules. Can be used to bridge ActiveMQ with any of the camel a shape=rect 
href=components.html title=ComponentsComponents/a. /td/trtrtd 
colspan=1 
 rowspan=1 class=confluenceTd a shape=rect class=external-link 
href=http://servicemix.apache.org/home.html;Apache ServiceMix/a /tdtd 
colspan=1 rowspan=1 class=confluenceTd Uses Camel as a routing engine as 
a a shape=rect class=external-link 
href=http://servicemix.apache.org/servicemix-camel.html;JBI service unit/a 
for use either in a shape=rect href=jbi.html title=JBIJBI/a or OSGi 
to route between JBI endpoints. See the a shape=rect class=external-link 
href=http://servicemix.apache.org/3-beginner-using-apache-camel-inside-servicemix.html;tutorial/a
 or a shape=rect class=external-link 
href=http://servicemix.apache.org/camel-example.html;example/a 
/td/trtrtd colspan=1 rowspan=1 class=confluenceTd a shape=rect 
class=external-link href=http://fusesource.com/products/enterprise-camel/; 
rel=nofollowFuse Mediation Router/a /tdtd colspan=1 rowspan=1 
class=confluenceTd a shape=rect class
 =external-link href=http://fusesource.com/; rel=nofollowFuseSource/a 
provides a commercial distribution of Camel complete with additional features 
and support as well as improved documenation and samples. /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd a shape=rect 
class=external-link 
href=http://fusesource.com/products/enterprise-servicemix/; 
rel=nofollowFuse ESB/a /tdtd colspan=1 rowspan=1 
class=confluenceTd a shape=rect class=external-link 
href=http://fusesource.com/; rel=nofollowFuseSource/a provides a 
commercial distribution of a shape=rect class=external-link 
href=http://servicemix.apache.org/home.html;Apache ServiceMix/a which 
includes a shape=rect class=external-link 
href=http://fusesource.com/products/enterprise-camel/; rel=nofollowFUSE 
Mediation Router/a which is a distribution of Camel /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd a shape=rect 
class=external-link hre
 f=http://fusesource.com/products/fuse-ide-camel/; rel=nofollowFuse IDE/a 
/tdtd colspan=1 rowspan=1 class=confluenceTd a shape=rect 
class=external-link href=http://fusesource.com/; 
rel=nofollowFuseSource/a provides developer tooling for Camel, ServiceMix, 
and ActiveMQ. Fuse IDE for Camel is a graphical, Eclipse-based tool for 
integrating software components that works with Apache Camel or Fuse Mediation 
Router. /td/trtrtd colspan=1 rowspan=1 class=confluenceTd a 
shape=rect class=external-link href=http://grails.org; 
rel=nofollowGrails/a /tdtd colspan=1 rowspan=1 
class=confluenceTd The a shape=rect class=external-link 
href=http://grails.org/plugin/routing; rel=nofollowGrails Camel Routing 
Plugin/a provides integration of Camel into Grails /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd a shape=rect 
class=external-link 
href=http://wiki.open-esb.java.net/Wiki.jsp?page=CamelSE; rel=nof
 ollowOpen ESB Camel SE/a /tdtd colspan=1 rowspan=1 
class=confluenceTd Provides a JBI Service Engine for a shape=rect 
class=external-link href=https://open-esb.dev.java.net/; rel=nofollowOpen 
ESB/a.  See the a shape=rect class=external-link 
href=http://blogs.sun.com/polyblog/entry/camel_fuji; rel=nofollowexample 
using OpenESB and 

svn commit: r1426191 [2/2] - in /camel/trunk: components/ components/camel-http/src/main/java/org/apache/camel/component/http/ components/camel-http/src/main/java/org/apache/camel/component/http/helpe

2012-12-27 Thread davsclaus
Added: 
camel/trunk/components/camel-urlrewrite/src/main/resources/META-INF/LICENSE.txt
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-urlrewrite/src/main/resources/META-INF/LICENSE.txt?rev=1426191view=auto
==
--- 
camel/trunk/components/camel-urlrewrite/src/main/resources/META-INF/LICENSE.txt 
(added)
+++ 
camel/trunk/components/camel-urlrewrite/src/main/resources/META-INF/LICENSE.txt 
Thu Dec 27 13:18:41 2012
@@ -0,0 +1,203 @@
+
+ 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
+   

svn commit: r843984 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache jetty.html

2012-12-27 Thread buildbot
Author: buildbot
Date: Thu Dec 27 13:24:55 2012
New Revision: 843984

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/jetty.html

Modified: websites/production/camel/content/book-component-appendix.html
==
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Thu Dec 27 
13:24:55 2012
@@ -8251,8 +8251,6 @@ from(span class=code-quotetimer:sp
 pThe bjetty/b component provides HTTP-based a shape=rect 
href=endpoint.html title=Endpointendpoints/a for consuming and producing 
HTTP requests. That is, the Jetty component behaves as a simple Web server.br 
clear=none
 Jetty can also be used as a http client which mean you can also use it with 
Camel as a producer./p
 
-div class=panelMacrotable class=tipMacrocolgroup span=1col 
span=1 width=24col span=1/colgrouptrtd colspan=1 rowspan=1 
valign=topimg align=middle 
src=https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif; 
width=16 height=16 alt= border=0/tdtd colspan=1 
rowspan=1bUpgrading from Jetty 6 to 7/bbr clear=noneYou can read 
more about upgrading Jetty a shape=rect class=external-link 
href=http://wiki.eclipse.org/Jetty/Howto/Upgrade_from_Jetty_6_to_Jetty_7; 
rel=nofollowhere/a/td/tr/table/div
-
 div class=panelMacrotable class=infoMacrocolgroup span=1col 
span=1 width=24col span=1/colgrouptrtd colspan=1 rowspan=1 
valign=topimg align=middle 
src=https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif;
 width=16 height=16 alt= border=0/tdtd colspan=1 
rowspan=1bStream/bbr clear=noneJetty is stream based, which means 
the input it receives is submitted to Camel as a stream. That means you will 
only be able to read the content of the stream bonce/b.br clear=none
 If you find a situation where the message body appears to be empty or you need 
to access the data multiple times (eg: doing multicasting, or redelivery error 
handling)br clear=none
 you should use a shape=rect href=stream-caching.html title=Stream 
cachingStream caching/a or convert the message body to a ttString/tt 
which is safe to be re-read multiple times./td/tr/table/div
@@ -8270,7 +8268,7 @@ jetty:http:span class=code-comment//
 h3a shape=rect name=BookComponentAppendix-Options/aOptions/h3
 div class=confluenceTableSmalldiv class=table-wrap
 table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Name /thth colspan=1 rowspan=1 
class=confluenceTh Default Value /thth colspan=1 rowspan=1 
class=confluenceTh Description /th/trtrtd colspan=1 rowspan=1 
class=confluenceTd ttsessionSupport/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd ttfalse/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd Specifies whether to enable the session manager on the 
server side of Jetty. /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd tthttpClient.XXX/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd ttnull/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd Configuration of Jetty's a shape=rect 
class=external-link href=http://wiki.eclipse.org/Jetty/Tutorial/HttpClient; 
rel=nofollowHttpClient/a. For example, setting 
tthttpClient.idleTimeout=3/tt sets the idle timeout to 30 seconds. 
/td/
 trtrtd colspan=1 rowspan=1 class=confluenceTd tthttpClient/tt 
/tdtd colspan=1 rowspan=1 class=confluenceTd ttnull/tt /tdtd 
colspan=1 rowspan=1 class=confluenceTd To use a shared 
ttorg.eclipse.jetty.client.HttpClient/tt for all producers created by this 
endpoint. This option should only be used in special circumstances. 
/td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
tthttpClientMinThreads/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd ttnull/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd bCamel 2.11:/b bProducer only/b: To set a value 
for minimum number of threads in ttHttpClient/tt thread pool. This setting 
override any setting configured on component level. Notice that both a min and 
max size must be configured. /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd tthttpClientMaxThreads/tt /tdtd colspan=1 
rowspan=1 class=confluenceTd ttnull/tt 
 /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 2.11:/b 
bProducer only/b: To set a value for maximum number of threads in 
ttHttpClient/tt thread pool. This setting override any setting configured 
on component level. Notice that both a min and max size must be configured. 
/td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
tthttpBindingRef/tt /tdtd colspan=1 rowspan=1 class=confluenceTd 
ttnull/tt /tdtd colspan=1 rowspan=1 class=confluenceTd Reference 
to an ttorg.apache.camel.component.http.HttpBinding/tt in the a 
shape=rect href=registry.html title=RegistryRegistry/a. 
ttHttpBinding/tt can be used to customize 

svn commit: r1426196 - in /camel/trunk/components: camel-http/ camel-urlrewrite/ camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/ camel-urlrewrite/src/test/java/org/apache/camel/c

2012-12-27 Thread davsclaus
Author: davsclaus
Date: Thu Dec 27 13:33:20 2012
New Revision: 1426196

URL: http://svn.apache.org/viewvc?rev=1426196view=rev
Log:
CAMEL-5912: More work on camel-urlrewrite

Added:

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewriteModFileTest.java
  - copied, changed from r1426191, 
camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewriteModTest.java

camel/trunk/components/camel-urlrewrite/src/test/resources/example/modrewrite.cfg
Modified:
camel/trunk/components/camel-http/   (props changed)
camel/trunk/components/camel-urlrewrite/   (props changed)

camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java

Propchange: camel/trunk/components/camel-http/
--
--- svn:ignore (original)
+++ svn:ignore Thu Dec 27 13:33:20 2012
@@ -14,3 +14,4 @@ eclipse-classes
 *.ipr
 *.iml
 *.iws
+.idea

Propchange: camel/trunk/components/camel-urlrewrite/
--
--- svn:ignore (added)
+++ svn:ignore Thu Dec 27 13:33:20 2012
@@ -0,0 +1,17 @@
+.pmd
+.checkstyle
+.ruleset
+target
+.settings
+.classpath
+.project
+.wtpmodules
+prj.el
+.jdee_classpath
+.jdee_sources
+velocity.log
+eclipse-classes
+*.ipr
+*.iml
+*.iws
+.idea

Modified: 
camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java?rev=1426196r1=1426195r2=1426196view=diff
==
--- 
camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java
 (original)
+++ 
camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java
 Thu Dec 27 13:33:20 2012
@@ -40,13 +40,14 @@ public abstract class UrlRewriteFilter e
 
 private static final Logger LOG = 
LoggerFactory.getLogger(UrlRewriteFilter.class);
 
-// TODO: Allow to use a config file for mod rewrite rules as well
 // TODO: Find a better way of starting/stopping this without adding as 
service to CamelContext
+// TODO: Dynamic ports of testing
 
 protected CamelContext camelContext;
 protected Conf conf;
 protected UrlRewriter urlRewriter;
 protected String configFile;
+protected String modRewriteConfFile;
 protected String modRewriteConfText;
 protected boolean useQueryString;
 
@@ -102,6 +103,14 @@ public abstract class UrlRewriteFilter e
 this.modRewriteConfText = modRewriteConfText;
 }
 
+public String getModRewriteConfFile() {
+return modRewriteConfFile;
+}
+
+public void setModRewriteConfFile(String modRewriteConfFile) {
+this.modRewriteConfFile = modRewriteConfFile;
+}
+
 public boolean isUseQueryString() {
 return useQueryString;
 }
@@ -115,7 +124,21 @@ public abstract class UrlRewriteFilter e
 ObjectHelper.notNull(camelContext, camelContext);
 
 if (conf == null) {
-if (modRewriteConfText != null) {
+if (modRewriteConfFile != null) {
+LOG.debug(Using mod rewrite config file: {} as config for 
urlRewrite, modRewriteConfFile);
+InputStream is = 
camelContext.getClassResolver().loadResourceAsStream(modRewriteConfFile);
+if (is == null) {
+throw new IOException(Cannot load mod rewrite config 
file:  + modRewriteConfFile);
+}
+try {
+String text = 
camelContext.getTypeConverter().mandatoryConvertTo(String.class, is);
+ModRewriteConfLoader loader = new ModRewriteConfLoader();
+conf = new Conf();
+loader.process(text, conf);
+} finally {
+IOHelper.close(is);
+}
+} else if (modRewriteConfText != null) {
 LOG.debug(Using modRewriteConfText: {} as config for 
urlRewrite, modRewriteConfText);
 ModRewriteConfLoader loader = new ModRewriteConfLoader();
 conf = new Conf();

Copied: 
camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewriteModFileTest.java
 (from r1426191, 
camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewriteModTest.java)
URL: 

svn commit: r1426200 - in /camel/trunk/components: camel-http/src/main/java/org/apache/camel/component/http/ camel-http/src/test/java/org/apache/camel/component/http/ camel-jetty/src/main/java/org/apa

2012-12-27 Thread davsclaus
Author: davsclaus
Date: Thu Dec 27 13:39:04 2012
New Revision: 1426200

URL: http://svn.apache.org/viewvc?rev=1426200view=rev
Log:
CAMEL-5912: Polished

Removed:

camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpRequestAdapter.java
Modified:

camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java

camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/GoogleUrlRewrite.java

camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java

Modified: 
camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java?rev=1426200r1=1426199r2=1426200view=diff
==
--- 
camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
 (original)
+++ 
camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
 Thu Dec 27 13:39:04 2012
@@ -333,6 +333,7 @@ public class HttpProducer extends Defaul
  */
 @SuppressWarnings(deprecation)
 protected HttpMethod createMethod(Exchange exchange) throws Exception {
+// creating the url to use takes 2-steps
 String url = HttpHelper.createURL(exchange, getEndpoint());
 URI uri = HttpHelper.createURI(exchange, url, getEndpoint());
 // get the url and query string from the uri

Modified: 
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/GoogleUrlRewrite.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/GoogleUrlRewrite.java?rev=1426200r1=1426199r2=1426200view=diff
==
--- 
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/GoogleUrlRewrite.java
 (original)
+++ 
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/GoogleUrlRewrite.java
 Thu Dec 27 13:39:04 2012
@@ -18,8 +18,11 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Producer;
 
+// START SNIPPET: e1
 /**
- *
+ * A very simple url rewrite that replaces yahoo with google in the url.
+ * p/
+ * This is only used for testing purposes.
  */
 public class GoogleUrlRewrite implements UrlRewrite {
 
@@ -28,3 +31,4 @@ public class GoogleUrlRewrite implements
 return url.replaceAll(yahoo, google);
 }
 }
+// END SNIPPET: e1

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=1426200r1=1426199r2=1426200view=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
 Thu Dec 27 13:39:04 2012
@@ -104,9 +104,10 @@ public class JettyHttpProducer extends D
 }
 
 protected JettyContentExchange createHttpExchange(Exchange exchange, 
AsyncCallback callback) throws Exception {
+// creating the url to use takes 2-steps
 String url = HttpHelper.createURL(exchange, getEndpoint());
 URI uri = HttpHelper.createURI(exchange, url, getEndpoint());
-// get the url and query string from the uri
+// get the url from the uri
 url = uri.toASCIIString();
 
 // execute any custom url rewrite




svn commit: r1426207 - in /camel/trunk/components/camel-urlrewrite/src: main/java/org/apache/camel/component/urlrewrite/ test/java/org/apache/camel/component/urlrewrite/ test/java/org/apache/camel/com

2012-12-27 Thread davsclaus
Author: davsclaus
Date: Thu Dec 27 13:54:38 2012
New Revision: 1426207

URL: http://svn.apache.org/viewvc?rev=1426207view=rev
Log:
CAMEL-5912: More work on camel-urlrewrite

Added:

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/BaseUrlRewriteTest.java
   (with props)
Modified:

camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewriteModFileTest.java

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewriteModTest.java

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewritePingQueryTest.java

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewritePingTest.java

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/http/HttpUrlRewriteTest.java

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/jetty/JettyUrlRewriteModTest.java

camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/jetty/JettyUrlRewriteTest.java
camel/trunk/components/camel-urlrewrite/src/test/resources/log4j.properties

Modified: 
camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java?rev=1426207r1=1426206r2=1426207view=diff
==
--- 
camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java
 (original)
+++ 
camel/trunk/components/camel-urlrewrite/src/main/java/org/apache/camel/component/urlrewrite/UrlRewriteFilter.java
 Thu Dec 27 13:54:38 2012
@@ -41,7 +41,7 @@ public abstract class UrlRewriteFilter e
 private static final Logger LOG = 
LoggerFactory.getLogger(UrlRewriteFilter.class);
 
 // TODO: Find a better way of starting/stopping this without adding as 
service to CamelContext
-// TODO: Dynamic ports of testing
+// TODO: Add support in camel-http4 and camel-ahc
 
 protected CamelContext camelContext;
 protected Conf conf;
@@ -50,6 +50,9 @@ public abstract class UrlRewriteFilter e
 protected String modRewriteConfFile;
 protected String modRewriteConfText;
 protected boolean useQueryString;
+protected boolean useContext;
+protected String defaultMatchType;
+protected String decodeUsing;
 
 public String rewrite(String url, HttpServletRequest request) throws 
Exception {
 RewrittenUrl response = urlRewriter.processRequest(request, null);
@@ -119,6 +122,30 @@ public abstract class UrlRewriteFilter e
 this.useQueryString = useQueryString;
 }
 
+public boolean isUseContext() {
+return useContext;
+}
+
+public void setUseContext(boolean useContext) {
+this.useContext = useContext;
+}
+
+public String getDefaultMatchType() {
+return defaultMatchType;
+}
+
+public void setDefaultMatchType(String defaultMatchType) {
+this.defaultMatchType = defaultMatchType;
+}
+
+public String getDecodeUsing() {
+return decodeUsing;
+}
+
+public void setDecodeUsing(String decodeUsing) {
+this.decodeUsing = decodeUsing;
+}
+
 @Override
 protected void doStart() throws Exception {
 ObjectHelper.notNull(camelContext, camelContext);
@@ -158,6 +185,13 @@ public abstract class UrlRewriteFilter e
 if (conf != null) {
 // set options before initializing
 conf.setUseQueryString(isUseQueryString());
+conf.setUseContext(isUseContext());
+if (getDefaultMatchType() != null) {
+conf.setDefaultMatchType(getDefaultMatchType());
+}
+if (getDecodeUsing() != null) {
+conf.setDecodeUsing(getDecodeUsing());
+}
 conf.initialise();
 }
 if (conf == null || !conf.isOk()) {

Added: 
camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/BaseUrlRewriteTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/BaseUrlRewriteTest.java?rev=1426207view=auto
==
--- 
camel/trunk/components/camel-urlrewrite/src/test/java/org/apache/camel/component/urlrewrite/BaseUrlRewriteTest.java
 (added)
+++ 

svn commit: r1426237 - /camel/trunk/components/pom.xml

2012-12-27 Thread davsclaus
Author: davsclaus
Date: Thu Dec 27 16:06:38 2012
New Revision: 1426237

URL: http://svn.apache.org/viewvc?rev=1426237view=rev
Log:
CAMEL-5912: Fixed typo in pom.xml. Thanks to Dejan for noticing this.

Modified:
camel/trunk/components/pom.xml

Modified: camel/trunk/components/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/pom.xml?rev=1426237r1=1426236r2=1426237view=diff
==
--- camel/trunk/components/pom.xml (original)
+++ camel/trunk/components/pom.xml Thu Dec 27 16:06:38 2012
@@ -161,7 +161,7 @@
 modulecamel-syslog/module
 modulecamel-tagsoup/module
 modulecamel-twitter/module
-modulecamel-urlrewite/module
+modulecamel-urlrewrite/module
 modulecamel-velocity/module
 modulecamel-websocket/module
 modulecamel-xmlbeans/module




svn commit: r1426239 - /camel/trunk/parent/pom.xml

2012-12-27 Thread davsclaus
Author: davsclaus
Date: Thu Dec 27 16:08:57 2012
New Revision: 1426239

URL: http://svn.apache.org/viewvc?rev=1426239view=rev
Log:
Upgraded concurrentlinkedhashmap-lru to 1.3.2

Modified:
camel/trunk/parent/pom.xml

Modified: camel/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1426239r1=1426238r2=1426239view=diff
==
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Thu Dec 27 16:08:57 2012
@@ -93,7 +93,7 @@
 commons-net-version3.1/commons-net-version
 commons-pool-version1.6/commons-pool-version
 commons-jxpath-version1.3/commons-jxpath-version
-concurrentlinkedhashmap.version1.3.1/concurrentlinkedhashmap.version
+concurrentlinkedhashmap.version1.3.2/concurrentlinkedhashmap.version
 cxf-version2.7.1/cxf-version
 cxf-version-range[2.4,2.8)/cxf-version-range
 cxf-xjc-utils-version2.6.0/cxf-xjc-utils-version




svn commit: r1426244 - in /camel/trunk: apache-camel/pom.xml apache-camel/src/main/descriptors/common-bin.xml parent/pom.xml

2012-12-27 Thread davsclaus
Author: davsclaus
Date: Thu Dec 27 16:21:39 2012
New Revision: 1426244

URL: http://svn.apache.org/viewvc?rev=1426244view=rev
Log:
CAMEL-5912: Added camel-urlrewrite to kit

Modified:
camel/trunk/apache-camel/pom.xml
camel/trunk/apache-camel/src/main/descriptors/common-bin.xml
camel/trunk/parent/pom.xml

Modified: camel/trunk/apache-camel/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/apache-camel/pom.xml?rev=1426244r1=1426243r2=1426244view=diff
==
--- camel/trunk/apache-camel/pom.xml (original)
+++ camel/trunk/apache-camel/pom.xml Thu Dec 27 16:21:39 2012
@@ -540,6 +540,10 @@
 /dependency
 dependency
   groupIdorg.apache.camel/groupId
+  artifactIdcamel-urlrewrite/artifactId
+/dependency
+dependency
+  groupIdorg.apache.camel/groupId
   artifactIdcamel-velocity/artifactId
 /dependency
 dependency

Modified: camel/trunk/apache-camel/src/main/descriptors/common-bin.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/apache-camel/src/main/descriptors/common-bin.xml?rev=1426244r1=1426243r2=1426244view=diff
==
--- camel/trunk/apache-camel/src/main/descriptors/common-bin.xml (original)
+++ camel/trunk/apache-camel/src/main/descriptors/common-bin.xml Thu Dec 27 
16:21:39 2012
@@ -147,6 +147,7 @@
 includeorg.apache.camel:camel-test-spring/include
 includeorg.apache.camel:camel-testng/include
 includeorg.apache.camel:camel-twitter/include
+includeorg.apache.camel:camel-urlrewrite/include
 includeorg.apache.camel:camel-velocity/include
 includeorg.apache.camel:camel-websocket/include
 includeorg.apache.camel:camel-xmlbeans/include

Modified: camel/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1426244r1=1426243r2=1426244view=diff
==
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Thu Dec 27 16:21:39 2012
@@ -1048,6 +1048,11 @@
   /dependency
   dependency
 groupIdorg.apache.camel/groupId
+artifactIdcamel-urlrewrite/artifactId
+version${project.version}/version
+  /dependency
+  dependency
+groupIdorg.apache.camel/groupId
 artifactIdcamel-velocity/artifactId
 version${project.version}/version
   /dependency




svn commit: r1426259 - /camel/trunk/parent/pom.xml

2012-12-27 Thread cmueller
Author: cmueller
Date: Thu Dec 27 17:27:35 2012
New Revision: 1426259

URL: http://svn.apache.org/viewvc?rev=1426259view=rev
Log:
upgrade spring3.2 profile from 3.2.0.RC1 to 3.2.0.RELEASE

Modified:
camel/trunk/parent/pom.xml

Modified: camel/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1426259r1=1426258r2=1426259view=diff
==
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Thu Dec 27 17:27:35 2012
@@ -311,7 +311,7 @@
 spring-version${spring31-version}/spring-version
 spring30-version3.0.7.RELEASE/spring30-version
 spring31-version3.1.3.RELEASE/spring31-version
-spring32-version3.2.0.RC1/spring32-version
+spring32-version3.2.0.RELEASE/spring32-version
 spring-osgi-version1.2.1/spring-osgi-version
 spring-security-version3.1.3.RELEASE/spring-security-version
 !-- spring WS 2.0.3 is the last release to support Spring 3.0.x --




svn commit: r1426270 - /camel/trunk/parent/pom.xml

2012-12-27 Thread cmueller
Author: cmueller
Date: Thu Dec 27 17:41:58 2012
New Revision: 1426270

URL: http://svn.apache.org/viewvc?rev=1426270view=rev
Log:
removed the unused icu4j-version property

Modified:
camel/trunk/parent/pom.xml

Modified: camel/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1426270r1=1426269r2=1426270view=diff
==
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Thu Dec 27 17:41:58 2012
@@ -161,7 +161,6 @@
 httpclient-version3.1/httpclient-version !-- FIXME cmueller: rename 
to commons-httpclient-version --
 ibatis-bundle-version2.3.4.726_4/ibatis-bundle-version
 ibatis-version2.3.4.726/ibatis-version
-icu4j-version4.8.1.1/icu4j-version
 irclib-bundle-version1.10_5/irclib-bundle-version
 irclib-version1.10/irclib-version
 isorelax-bundle-version20050913_4/isorelax-bundle-version




svn commit: r1426387 - in /camel/branches/camel-2.10.x: ./ components/camel-test-spring/pom.xml

2012-12-27 Thread ningjiang
Author: ningjiang
Date: Fri Dec 28 03:42:21 2012
New Revision: 1426387

URL: http://svn.apache.org/viewvc?rev=1426387view=rev
Log:
CAMEL-5915 fixed the camel-test-spring mixed up no related classes issue
Merged revisions 1426385 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk


  r1426385 | ningjiang | 2012-12-28 11:39:15 +0800 (Fri, 28 Dec 2012) | 1 line
  
  CAMEL-5915 fixed the camel-test-spring mixed up no related classes issue


Modified:
camel/branches/camel-2.10.x/   (props changed)
camel/branches/camel-2.10.x/components/camel-test-spring/pom.xml

Propchange: camel/branches/camel-2.10.x/
--
  Merged /camel/trunk:r1426385

Propchange: camel/branches/camel-2.10.x/
--
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/components/camel-test-spring/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-test-spring/pom.xml?rev=1426387r1=1426386r2=1426387view=diff
==
--- camel/branches/camel-2.10.x/components/camel-test-spring/pom.xml (original)
+++ camel/branches/camel-2.10.x/components/camel-test-spring/pom.xml Fri Dec 28 
03:42:21 2012
@@ -33,7 +33,7 @@
 
 properties
spring-version3.1.2.RELEASE/spring-version
-camel.osgi.export.pkgorg.apache.camel.test.*/camel.osgi.export.pkg
+
camel.osgi.export.pkgorg.apache.camel.test.spring.*/camel.osgi.export.pkg
 /properties
 
 dependencies




svn commit: r1426385 - /camel/trunk/components/camel-test-spring/pom.xml

2012-12-27 Thread ningjiang
Author: ningjiang
Date: Fri Dec 28 03:39:15 2012
New Revision: 1426385

URL: http://svn.apache.org/viewvc?rev=1426385view=rev
Log:
CAMEL-5915 fixed the camel-test-spring mixed up no related classes issue

Modified:
camel/trunk/components/camel-test-spring/pom.xml

Modified: camel/trunk/components/camel-test-spring/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-test-spring/pom.xml?rev=1426385r1=1426384r2=1426385view=diff
==
--- camel/trunk/components/camel-test-spring/pom.xml (original)
+++ camel/trunk/components/camel-test-spring/pom.xml Fri Dec 28 03:39:15 2012
@@ -32,7 +32,7 @@
 
 properties
 spring-version${spring31-version}/spring-version
-camel.osgi.export.pkgorg.apache.camel.test.*/camel.osgi.export.pkg
+
camel.osgi.export.pkgorg.apache.camel.test.spring.*/camel.osgi.export.pkg
 /properties
 
 dependencies