svn commit: r1450677 - /camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java

2013-02-27 Thread davsclaus
Author: davsclaus
Date: Wed Feb 27 08:40:04 2013
New Revision: 1450677

URL: http://svn.apache.org/r1450677
Log:
Polished

Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java?rev=1450677r1=1450676r2=1450677view=diff
==
--- camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java 
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java Wed 
Feb 27 08:40:04 2013
@@ -853,7 +853,6 @@ public interface CamelContext extends Su
  * Gets the property value that can be referenced in the camel context
  *
  * @return the string value of property
- * 
  */
 String getProperty(String name);
 




svn commit: r1450699 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/component/bean/ test/java/org/apache/camel/component/bean/

2013-02-27 Thread davsclaus
Author: davsclaus
Date: Wed Feb 27 09:58:07 2013
New Revision: 1450699

URL: http://svn.apache.org/r1450699
Log:
CAMEL-6043: Bean language/expression with OGNL now uses BeanInfo cache to 
speedup evaluations at runtime using the same class types (cache hit). Let the 
cache be controlled by the bean component and ensure its lifecycle is 
controlled by the component.

Added:

camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfoCacheKey.java
Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java

camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java

camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/CamelSimpleExpressionPerfTestRunner.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java?rev=1450699r1=1450698r2=1450699view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java
 Wed Feb 27 09:58:07 2013
@@ -22,6 +22,9 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.Processor;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.impl.ProcessorEndpoint;
+import org.apache.camel.util.LRUSoftCache;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The a href=http://camel.apache.org/bean.html;Bean Component/a
@@ -31,6 +34,11 @@ import org.apache.camel.impl.ProcessorEn
  */
 public class BeanComponent extends DefaultComponent {
 
+private static final transient Logger LOG = 
LoggerFactory.getLogger(BeanComponent.class);
+// use an internal soft cache for BeanInfo as they are costly to introspect
+// for example the bean language using OGNL expression runs much faster 
reusing the BeanInfo from this cache
+private final LRUSoftCacheBeanInfoCacheKey, BeanInfo cache = new 
LRUSoftCacheBeanInfoCacheKey, BeanInfo(1000);
+
 public BeanComponent() {
 }
 
@@ -67,4 +75,20 @@ public class BeanComponent extends Defau
 protected BeanEndpoint createEndpoint(String uri, BeanProcessor processor) 
{
 return new BeanEndpoint(uri, this, processor);
 }
+
+BeanInfo getBeanInfoFromCache(BeanInfoCacheKey key) {
+return cache.get(key);
+}
+
+void addBeanInfoToCache(BeanInfoCacheKey key, BeanInfo beanInfo) {
+cache.put(key, beanInfo);
+}
+
+@Override
+protected void doShutdown() throws Exception {
+if (LOG.isDebugEnabled()) {
+LOG.debug(Clearing BeanInfo cache[size={}, hits={}, misses={}, 
evicted={}], new Object[]{cache.size(), cache.getHits(), cache.getMisses(), 
cache.getEvicted()});
+}
+cache.clear();
+}
 }

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java?rev=1450699r1=1450698r2=1450699view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
 Wed Feb 27 09:58:07 2013
@@ -57,11 +57,11 @@ import org.slf4j.LoggerFactory;
  * introspection and annotations together with some useful sensible defaults
  */
 public class BeanInfo {
-public static final String BEAN_INFO_CACHE_REGISTRY_KEY = 
CamelBeanInfoCache;
 private static final transient Logger LOG = 
LoggerFactory.getLogger(BeanInfo.class);
 private static final String CGLIB_CLASS_SEPARATOR = $$;
 private static final ListMethod EXCLUDED_METHODS = new 
ArrayListMethod();
 private final CamelContext camelContext;
+private final BeanComponent component;
 private final Class? type;
 private final ParameterMappingStrategy strategy;
 private final MethodInfo defaultMethod;
@@ -103,22 +103,24 @@ public class BeanInfo {
 this.camelContext = camelContext;
 this.type = type;
 this.strategy = strategy;
+this.component = camelContext.getComponent(bean, 
BeanComponent.class);
 
-MapCacheKey, BeanInfo cache = (MapCacheKey, BeanInfo) 
camelContext.getRegistry().lookupByNameAndType(BEAN_INFO_CACHE_REGISTRY_KEY, 
Map.class);
-CacheKey cacheKey = new CacheKey(type, explicitMethod, strategy);
-if (cache != null) {
-BeanInfo beanInfo = cache.get(cacheKey);
-if (beanInfo != null) {
-defaultMethod = beanInfo.defaultMethod;
-operations = beanInfo.operations;
-

[CONF] Apache Camel Camel 2.11.0 Release

2013-02-27 Thread confluence







Camel 2.11.0 Release
Page edited by Claus Ibsen


 Changes (3)
 




...
* Added {{transacted}} option to [Hazelcast SEDA consumer|Hazelcast Component] to use Hazelcast transaction. * Added [{{spring-ldap}} component|https://cwiki.apache.org/confluence/display/CAMEL/Spring+LDAP]. 
* Improved performance of [Simple] and [Bean] language when using OGNL _expression_, by leveraging an internal cache to avoid introspecting the same types over and over again. 
 h3. Fixed issues 
...
* Ehcache 2.5.1 to 2.6.3 * Google App Engine 1.6.6 to 1.7.4 
* Groovy 1.8.6 to 2.1.01 
* GSon 2.1 to 2.2.2 * Guice 2.0 to 3.0 
...
* MongoDB Java Driver 2.7.3 to 2.9.1 * MQTTClient 1.2 to 1.4 
* Netty 3.5.1 to 3.6.23 
* Ognl bundle 3.0.4_1 to 3.0.5_1 * OSGi 4.2.0 to 4.3.1 
...


Full Content

Camel 2.11.0 release (currently in progress)




New and Noteworthy

Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: 


	Added Binding support, so it is easy to combine things like a Data Format to an Endpoint for easier composition of routes.
	Added support for SOAP 1.2 in SOAP data format.
	Cache operation for add/update now supports expiry headers to control time to live/idle/eternal.
	Added allowNullBody option to JMS to configure whether sending messages with no body is allowed.
	Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism.
	Added support for daily and weekly trends to Twitter component.
	The Camel Maven Archetypes now generates projects without any license headers.
	Added rejectOld option to the Resequencer to prevent out of order messages from being delivered after capacity/timeout events occur
	Further optimized XPath under concurrent load, and as well ensured resources are cleaned up eagerly
	Added options allowNullBody and readLockMinLength to the File and FTP components.
	Made changed read lock strategy on FTP go faster (eg when the FTP server has a lot of files in the directory) if you enable the fastExistsCheck=true option as well. Notice that some FTP server may not support this.
	HL7 moves to HAPI 2.0 and supports using a dedicated Parser instance in the HL7 MLLP codec and DataFormat. Added "Terser" language and _expression_ to be able to extract fields from a parsed message. HL7 now uses Apache Mina 2.x.
	Add an option HttpMethodRestrict to restrict HTTP method in Jetty and SERVLET
	Add support for selection of DirectVM consumers by using ant-like path _expression_.
	The POJO Producing, and POJO Consuming with @Consume, @Produce, @EndpointInject now supports a new {{property} attribute to get the endpoint configuration from a bean property (eg using a getter method); this allows you to configure this on the bean using conventional bean configuration.
	Testing with camel-test-blueprint on Windows no longer tries to cleanup after testing taking up 5 seconds and logging WARNs.
	The File, and FTP components now support fileExist=Move option to move any existing files before writing a file.
	Added option loadStatisticsEnabled on Camel JMX to allow to disable load statistics if not needed (avoids a background thread being in use, to calculate the load stats).
	Enabled "lazy connections" for XMPP providers via the testConnectionOnStartup option
	Added a connection monitor to detect and fix dropped XMPP consumer connections at configurable connectionPollDelay intervals
	Added an org.apache.camel.builder.ExchangeBuilder to build the Exchange using a builder pattern.
	The Camel Run Maven Goal can now run CDI applications.
	The Camel CDI component has improved a lot.
	Added option allowRedeliveryWhileStopping to error handlers to control if redelivery is allowed during stopping/shutting down Camel or the route(s). Turning this option false allows to stop quicker by rejecting redelivery attempts.
	Added support for specifying user info in Camel Endpoint urls, which contains the @ sign; now the @ sign can be given as is; without being encoded to %40.
	Added robust connection support for JMX. Optional testConnectionOnStartup allows a JMX consumer to attach to a JMX server that becomes available after the JMX endpoint starts; reconnectOnConnectionFailure enables re-connection of failed JMX connections.
	JAXB and SOAP data format now supports controlling namespace prefix mappings when marshalling (eg to avoid prefixes such as ns2, ns3, ns4 etc.)
	Added support for using raw uris when Components create Endpoints. This gives component writers full power in case their 

svn commit: r852193 - in /websites/production/camel/content: cache/main.pageCache camel-2110-release.html

2013-02-27 Thread buildbot
Author: buildbot
Date: Wed Feb 27 10:18:51 2013
New Revision: 852193

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-2110-release.html

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

Modified: websites/production/camel/content/camel-2110-release.html
==
--- websites/production/camel/content/camel-2110-release.html (original)
+++ websites/production/camel/content/camel-2110-release.html Wed Feb 27 
10:18:51 2013
@@ -84,7 +84,7 @@
 
 pWelcome to the 2.11.0 release with approximately XXX issues resolved - 
including new features, improvements, and bug fixes, such as: /p
 
-ulliAdded a shape=rect href=binding.html title=BindingBinding/a 
support, so it is easy to combine things like a a shape=rect 
href=data-format.html title=Data FormatData Format/a to an a 
shape=rect href=endpoint.html title=EndpointEndpoint/a for easier 
composition of routes./liliAdded support for SOAP 1.2 in a shape=rect 
href=soap.html title=SOAPSOAP/a data format./lilia shape=rect 
href=cache.html title=CacheCache/a operation for add/update now supports 
expiry headers to control time to live/idle/eternal./liliAdded 
ttallowNullBody/tt option to a shape=rect href=jms.html 
title=JMSJMS/a to configure whether sending messages with no body is 
allowed./liliAdded ttconnectOnStartup/tt option to a shape=rect 
href=hdfs.html title=HDFSHDFS/a to allow to connect on demand, to avoid 
having Hadoop block for long time connecting to the HDFS cluster, as it has a 
hardcoded 15 minute retry mechan
 ism./liliAdded support for daily and weekly trends to a shape=rect 
href=twitter.html title=TwitterTwitter/a component./liliThe a 
shape=rect href=camel-maven-archetypes.html title=Camel Maven 
ArchetypesCamel Maven Archetypes/a now generates projects without any 
license headers./liliAdded ttrejectOld/tt option to the a shape=rect 
href=resequencer.html title=ResequencerResequencer/a to prevent out of 
order messages from being delivered after capacity/timeout events 
occur/liliFurther optimized a shape=rect href=xpath.html 
title=XPathXPath/a under concurrent load, and as well ensured resources 
are cleaned up eagerly/liliAdded options ttallowNullBody/tt and 
ttreadLockMinLength/tt to the a shape=rect href=file2.html 
title=File2File/a and a shape=rect href=ftp2.html 
title=FTP2FTP/a components./liliMade ttchanged/tt read lock 
strategy on a shape=rect href=ftp2.html title=FTP2FT
 P/a go faster (eg when the FTP server has a lot of files in the directory) 
if you enable the ttfastExistsCheck=true/tt option as well. Notice that 
some FTP server may not support this./lilia shape=rect href=hl7.html 
title=HL7HL7/a moves to HAPI 2.0 and supports using a dedicated Parser 
instance in the a shape=rect href=hl7.html title=HL7HL7/a MLLP codec 
and DataFormat. Added Terser language and expression to be able to extract 
fields from a parsed message. a shape=rect href=hl7.html 
title=HL7HL7/a now uses Apache Mina 2.x./liliAdd an option 
ttHttpMethodRestrict/tt to restrict HTTP method in a shape=rect 
href=jetty.html title=JettyJetty/a and a shape=rect 
href=servlet.html title=SERVLETSERVLET/a/liliAdd support for 
selection of a shape=rect href=direct-vm.html 
title=Direct-VMDirect-VM/a consumers by using ant-like path 
expression./liliThe a shape=rect href=pojo-producing.html title=P
 OJO ProducingPOJO Producing/a, and a shape=rect 
href=pojo-consuming.html title=POJO ConsumingPOJO Consuming/a with 
@Consume, @Produce, @EndpointInject now supports a new {{property} attribute to 
get the endpoint configuration from a bean property (eg using a getter method); 
this allows you to configure this on the bean using conventional bean 
configuration./liliTesting with ttcamel-test-blueprint/tt on Windows no 
longer tries to cleanup after testing taking up 5 seconds and logging 
WARNs./liliThe a shape=rect href=file2.html title=File2File/a, 
and a shape=rect href=ftp2.html title=FTP2FTP/a components now 
support ttfileExist=Move/tt option to move any existing files before 
writing a file./liliAdded option ttloadStatisticsEnabled/tt on a 
shape=rect href=camel-jmx.html title=Camel JMXCamel JMX/a to allow to 
disable load statistics if not needed (avoids a background thread being in use, 
to calculate the load st
 ats)./liliEnabled lazy connections for a shape=rect href=xmpp.html 
title=XMPPXMPP/a providers via the tttestConnectionOnStartup/tt 
option/liliAdded a connection monitor to detect and fix dropped a 
shape=rect href=xmpp.html title=XMPPXMPP/a consumer connections at 
configurable ttconnectionPollDelay/tt intervals/liliAdded an 
ttorg.apache.camel.builder.ExchangeBuilder/tt to build the a shape=rect 
href=exchange.html title=ExchangeExchange/a using 

svn commit: r1450754 - /camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java

2013-02-27 Thread davsclaus
Author: davsclaus
Date: Wed Feb 27 12:00:17 2013
New Revision: 1450754

URL: http://svn.apache.org/r1450754
Log:
CAMEL-6042: Fixed aggregator to set the correlated key on the exchange 
properties before removing, as its needed by custom aggregation repositories to 
be presented before remove is called.

Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java?rev=1450754r1=1450753r2=1450754view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
 Wed Feb 27 12:00:17 2013
@@ -416,12 +416,15 @@ public class AggregateProcessor extends 
 }
 
 protected void onCompletion(final String key, final Exchange original, 
final Exchange aggregated, boolean fromTimeout) {
+// store the correlation key as property before we remove so the 
repository has that information
+if (original != null) {
+original.setProperty(Exchange.AGGREGATED_CORRELATION_KEY, key);
+}
+aggregated.setProperty(Exchange.AGGREGATED_CORRELATION_KEY, key);
+
 // remove from repository as its completed, we do this first as to 
trigger any OptimisticLockingException's
 aggregationRepository.remove(aggregated.getContext(), key, original);
 
-// store the correlation key as property
-aggregated.setProperty(Exchange.AGGREGATED_CORRELATION_KEY, key);
-
 if (!fromTimeout  timeoutMap != null) {
 // cleanup timeout map if it was a incoming exchange which 
triggered the timeout (and not the timeout checker)
 timeoutMap.remove(key);




svn commit: r1450777 - /camel/branches/camel-2.10.x/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/AbstractRouteCommand.java

2013-02-27 Thread cschneider
Author: cschneider
Date: Wed Feb 27 13:58:58 2013
New Revision: 1450777

URL: http://svn.apache.org/r1450777
Log:
CAMEL-5968 Consolidate route commands using actract command, solve 
classnotfound exception with websphere jms

Modified:

camel/branches/camel-2.10.x/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/AbstractRouteCommand.java

Modified: 
camel/branches/camel-2.10.x/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/AbstractRouteCommand.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/AbstractRouteCommand.java?rev=1450777r1=1450776r2=1450777view=diff
==
--- 
camel/branches/camel-2.10.x/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/AbstractRouteCommand.java
 (original)
+++ 
camel/branches/camel-2.10.x/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/AbstractRouteCommand.java
 Wed Feb 27 13:58:58 2013
@@ -47,7 +47,15 @@ public abstract class AbstractRouteComma
 }
 for (Route camelRoute : camelRoutes) {
 CamelContext camelContext = 
camelRoute.getRouteContext().getCamelContext();
-executeOnRoute(camelContext, camelRoute);
+// Setting thread context classloader to the bundle classloader to 
enable
+// legacy code that relies on it
+ClassLoader oldClassloader = 
Thread.currentThread().getContextClassLoader();
+
Thread.currentThread().setContextClassLoader(camelContext.getApplicationContextClassLoader());
+try {
+executeOnRoute(camelContext, camelRoute);
+} finally {
+Thread.currentThread().setContextClassLoader(oldClassloader);
+}
 }
 
 return null;




svn commit: r1451096 - in /camel/trunk/components/camel-xmlbeans: ./ src/main/java/org/apache/camel/converter/xmlbeans/ src/test/data/ src/test/java/org/apache/camel/converter/xmlbeans/ src/test/resou

2013-02-27 Thread cmueller
Author: cmueller
Date: Thu Feb 28 05:19:24 2013
New Revision: 1451096

URL: http://svn.apache.org/r1451096
Log:
CAMEL-6110: camel-xmlbeans: Improve the test coverage

Added:
camel/trunk/components/camel-xmlbeans/src/test/data/
camel/trunk/components/camel-xmlbeans/src/test/data/buyStocks.xml

camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/MarshalTest.java

camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansDslTest.java
camel/trunk/components/camel-xmlbeans/src/test/resources/xsd/
camel/trunk/components/camel-xmlbeans/src/test/resources/xsd/buyStocks.xsd
Removed:

camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/UnmarshalThenMarshalTest.java

camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConcurrencyTest.java
Modified:
camel/trunk/components/camel-xmlbeans/pom.xml

camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java

camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java

camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/UnmarshalTest.java

camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java

Modified: camel/trunk/components/camel-xmlbeans/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-xmlbeans/pom.xml?rev=1451096r1=1451095r2=1451096view=diff
==
--- camel/trunk/components/camel-xmlbeans/pom.xml (original)
+++ camel/trunk/components/camel-xmlbeans/pom.xml Thu Feb 28 05:19:24 2013
@@ -71,4 +71,24 @@
 /dependency
   /dependencies
 
+build
+plugins
+plugin
+groupIdorg.codehaus.mojo/groupId
+artifactIdxmlbeans-maven-plugin/artifactId
+version2.3.3/version
+executions
+execution
+goals
+goalxmlbeans-test/goal
+/goals
+/execution
+/executions
+inheritedtrue/inherited
+configuration
+schemaDirectorysrc/test/resources/xsd/schemaDirectory
+/configuration
+/plugin
+/plugins
+/build
 /project

Modified: 
camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java?rev=1451096r1=1451095r2=1451096view=diff
==
--- 
camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
 (original)
+++ 
camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
 Thu Feb 28 05:19:24 2013
@@ -37,8 +37,6 @@ import org.apache.xmlbeans.impl.piccolo.
 /**
  * A a href=http://camel.apache.org/type-coverter.html;Type Converter/a
  * of XMLBeans objects
- *
- * @version 
  */
 @Converter
 public final class XmlBeansConverter {
@@ -87,9 +85,8 @@ public final class XmlBeansConverter {
 }
 
 @Converter
-public XmlObject toXmlObject(Source value, Exchange exchange) throws 
IOException, XmlException, NoTypeConversionAvailableException {
+public static XmlObject toXmlObject(Source value, Exchange exchange) 
throws IOException, XmlException, NoTypeConversionAvailableException {
 Reader reader = 
exchange.getContext().getTypeConverter().mandatoryConvertTo(Reader.class, 
value);
 return XmlObject.Factory.parse(reader);
 }
-
 }

Modified: 
camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java?rev=1451096r1=1451095r2=1451096view=diff
==
--- 
camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
 (original)
+++ 
camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
 Thu Feb 28 05:19:24 2013
@@ -27,8 +27,6 @@ import org.apache.xmlbeans.XmlObject;
 /**
  * A a href=http://camel.apache.org/data-format.html;data format/a
  * ({@link DataFormat}) using XmlBeans to marshal to and from XML
- *
- * @version 
  */
 public class XmlBeansDataFormat implements DataFormat {
 

Added: 

svn commit: r1451097 - in /camel/branches/camel-2.10.x/components/camel-xmlbeans: ./ src/main/java/org/apache/camel/converter/xmlbeans/ src/test/data/ src/test/java/org/apache/camel/converter/xmlbeans

2013-02-27 Thread cmueller
Author: cmueller
Date: Thu Feb 28 05:22:52 2013
New Revision: 1451097

URL: http://svn.apache.org/r1451097
Log:
CAMEL-6110: camel-xmlbeans: Improve the test coverage

Added:
camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/data/

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/data/buyStocks.xml

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/MarshalTest.java

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansDslTest.java

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/resources/xsd/

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/resources/xsd/buyStocks.xsd
Removed:

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/UnmarshalThenMarshalTest.java

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConcurrencyTest.java
Modified:
camel/branches/camel-2.10.x/components/camel-xmlbeans/pom.xml

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/UnmarshalTest.java

camel/branches/camel-2.10.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java

Modified: camel/branches/camel-2.10.x/components/camel-xmlbeans/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-xmlbeans/pom.xml?rev=1451097r1=1451096r2=1451097view=diff
==
--- camel/branches/camel-2.10.x/components/camel-xmlbeans/pom.xml (original)
+++ camel/branches/camel-2.10.x/components/camel-xmlbeans/pom.xml Thu Feb 28 
05:22:52 2013
@@ -71,4 +71,24 @@
 /dependency
   /dependencies
 
+build
+plugins
+plugin
+groupIdorg.codehaus.mojo/groupId
+artifactIdxmlbeans-maven-plugin/artifactId
+version2.3.3/version
+executions
+execution
+goals
+goalxmlbeans-test/goal
+/goals
+/execution
+/executions
+inheritedtrue/inherited
+configuration
+schemaDirectorysrc/test/resources/xsd/schemaDirectory
+/configuration
+/plugin
+/plugins
+/build
 /project

Modified: 
camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java?rev=1451097r1=1451096r2=1451097view=diff
==
--- 
camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
 (original)
+++ 
camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
 Thu Feb 28 05:22:52 2013
@@ -37,8 +37,6 @@ import org.apache.xmlbeans.impl.piccolo.
 /**
  * A a href=http://camel.apache.org/type-coverter.html;Type Converter/a
  * of XMLBeans objects
- *
- * @version 
  */
 @Converter
 public final class XmlBeansConverter {
@@ -87,9 +85,8 @@ public final class XmlBeansConverter {
 }
 
 @Converter
-public XmlObject toXmlObject(Source value, Exchange exchange) throws 
IOException, XmlException, NoTypeConversionAvailableException {
+public static XmlObject toXmlObject(Source value, Exchange exchange) 
throws IOException, XmlException, NoTypeConversionAvailableException {
 Reader reader = 
exchange.getContext().getTypeConverter().mandatoryConvertTo(Reader.class, 
value);
 return XmlObject.Factory.parse(reader);
 }
-
 }

Modified: 
camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java?rev=1451097r1=1451096r2=1451097view=diff
==
--- 
camel/branches/camel-2.10.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
 (original)
+++ 

svn commit: r1451099 - in /camel/branches/camel-2.9.x/components/camel-xmlbeans: ./ src/main/java/org/apache/camel/converter/xmlbeans/ src/test/data/ src/test/java/org/apache/camel/converter/xmlbeans/

2013-02-27 Thread cmueller
Author: cmueller
Date: Thu Feb 28 05:24:50 2013
New Revision: 1451099

URL: http://svn.apache.org/r1451099
Log:
CAMEL-6110: camel-xmlbeans: Improve the test coverage

Added:
camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/data/

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/data/buyStocks.xml

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/MarshalTest.java

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansDslTest.java
camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/resources/xsd/

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/resources/xsd/buyStocks.xsd
Removed:

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/UnmarshalThenMarshalTest.java

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConcurrencyTest.java
Modified:
camel/branches/camel-2.9.x/components/camel-xmlbeans/pom.xml

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/UnmarshalTest.java

camel/branches/camel-2.9.x/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java

Modified: camel/branches/camel-2.9.x/components/camel-xmlbeans/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-xmlbeans/pom.xml?rev=1451099r1=1451098r2=1451099view=diff
==
--- camel/branches/camel-2.9.x/components/camel-xmlbeans/pom.xml (original)
+++ camel/branches/camel-2.9.x/components/camel-xmlbeans/pom.xml Thu Feb 28 
05:24:50 2013
@@ -71,4 +71,24 @@
 /dependency
   /dependencies
 
+build
+plugins
+plugin
+groupIdorg.codehaus.mojo/groupId
+artifactIdxmlbeans-maven-plugin/artifactId
+version2.3.3/version
+executions
+execution
+goals
+goalxmlbeans-test/goal
+/goals
+/execution
+/executions
+inheritedtrue/inherited
+configuration
+schemaDirectorysrc/test/resources/xsd/schemaDirectory
+/configuration
+/plugin
+/plugins
+/build
 /project

Modified: 
camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java?rev=1451099r1=1451098r2=1451099view=diff
==
--- 
camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
 Thu Feb 28 05:24:50 2013
@@ -37,8 +37,6 @@ import org.apache.xmlbeans.impl.piccolo.
 /**
  * A a href=http://camel.apache.org/type-coverter.html;Type Converter/a
  * of XMLBeans objects
- *
- * @version 
  */
 @Converter
 public final class XmlBeansConverter {
@@ -87,9 +85,8 @@ public final class XmlBeansConverter {
 }
 
 @Converter
-public XmlObject toXmlObject(Source value, Exchange exchange) throws 
IOException, XmlException, NoTypeConversionAvailableException {
+public static XmlObject toXmlObject(Source value, Exchange exchange) 
throws IOException, XmlException, NoTypeConversionAvailableException {
 Reader reader = 
exchange.getContext().getTypeConverter().mandatoryConvertTo(Reader.class, 
value);
 return XmlObject.Factory.parse(reader);
 }
-
 }

Modified: 
camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java?rev=1451099r1=1451098r2=1451099view=diff
==
--- 
camel/branches/camel-2.9.x/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
 (original)
+++ 

[CONF] Apache Camel Validation

2013-02-27 Thread confluence







Validation
Page edited by Claus Ibsen


 Changes (1)
 




...
| {{useSharedSchema}} | {{true}} | *Camel 2.3:* Whether the {{Schema}} instance should be shared or not. This option is introduced to work around a [JDK 1.6.x bug|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6773084]. Xerces should not have this issue. | | {{failIfNoBody}} | {{true}} | *Camel 2.9.5/2.10.3:* Whether to fail if no body exists. | 
| {{headerName}} | {{null}} | *Camel 2.11:* To validate against a header instead of the message body. | | {{failOnNullHeader}} | {{true}} | *Camel 2.11:* Whether to fail if no header exists when validating against a header. | 
{div}  
...


Full Content

Validation Component

The Validation component performs XML validation of the message body using the JAXP Validation API and based on any of the supported XML schema languages, which defaults to XML Schema 

Note that the Jing component also supports the following useful schema languages:


	RelaxNG Compact Syntax
	RelaxNG XML Syntax



The MSV component also supports RelaxNG XML Syntax.

URI format



validator:someLocalOrRemoteResource



Where someLocalOrRemoteResource is some URL to a local resource on the classpath or a full URL to a remote resource or resource on the file system which contains the XSD to validate against. For example:


	msv:org/foo/bar.xsd
	msv:file:../foo/bar.xsd
	msv:http://acme.com/cheese.xsd
	validator:com/mypackage/myschema.xsd



Maven users will need to add the following dependency to their pom.xml for this component when using Camel 2.8 or older:


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


From Camel 2.9 onwards the Validation component is provided directly in the camel-core.

Options



 Option 
 Default 
 Description 


 resourceResolver 
 null 
 Camel 2.9: Reference to a org.w3c.dom.ls.LSResourceResolver in the Registry. 


 useDom 
 false 
 Whether DOMSource/DOMResult or SaxSource/SaxResult should be used by the validator. 


 useSharedSchema 
 true 
 Camel 2.3: Whether the Schema instance should be shared or not. This option is introduced to work around a JDK 1.6.x bug. Xerces should not have this issue. 


 failIfNoBody 
 true 
 Camel 2.9.5/2.10.3: Whether to fail if no body exists. 


 headerName 
 null 
 Camel 2.11: To validate against a header instead of the message body. 


 failOnNullHeader 
 true 
 Camel 2.11: Whether to fail if no header exists when validating against a header. 





Example

The following example shows how to configure a route from endpoint direct:start which then goes to one of two endpoints, either mock:valid or mock:invalid based on whether or not the XML matches the given schema (which is supplied on the classpath).


route
from uri="direct:start"/
doTry
to uri="validator:org/apache/camel/component/validator/schema.xsd"/
to uri="mock:valid"/
doCatch
exceptionorg.apache.camel.ValidationException/exception
to uri="mock:invalid"/
/doCatch
doFinally
to uri="mock:finally"/
/doFinally
/doTry
/route



See Also

	Configuring Camel
	Component
	Endpoint
	Getting Started





Change Notification Preferences

View Online
|
View Changes
|
Add Comment









[CONF] Apache Camel Spring LDAP

2013-02-27 Thread confluence







Spring LDAP
Page edited by Claus Ibsen


 Changes (2)
 




h2. Spring LDAP Component 
*Available since Camel 2.11* 
 
_available since: 2.11_  
The *spring-ldap:* component provides a Camel wrapper for [Spring LDAP|http://www.springsource.org/ldap].  
...


Full Content

Spring LDAP Component
Available since Camel 2.11

The spring-ldap: component provides a Camel wrapper for Spring LDAP.

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


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



URI format



spring-ldap:springLdapTemplate[?options]


Where springLdapTemplate is the name of the Spring LDAP Template bean. In this bean, you configure the URL and the credentials for your LDAP access.

Options



 Name 
 Type 
 Description 


 operation 
 String 
 The LDAP operation to be performed. Must be one of search, bind, or unbind. 


 scope 
 String 
 The scope of the search operation. Must be one of object, onelevel, or subtree, see also http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Search_and_Compare 




If an unsupported value is specified for some option, the component throws an UnsupportedOperationException.

Usage

The component supports producer endpoint only. An attempt to create a consumer endpoint will result in an UnsupportedOperationException.
The body of the message must be a map (an instance of java.util.Map). This map must contain at least an entry with the key dn that specifies the root node for the LDAP operation to be performed. Other entries of the map are operation-specific (see below).

The body of the message remains unchanged for the bind and unbind operations. For the search operation, the body is set to the result of the search, see http://static.springsource.org/spring-ldap/site/apidocs/org/springframework/ldap/core/LdapTemplate.html#search%28java.lang.String,%20java.lang.String,%20int,%20org.springframework.ldap.core.AttributesMapper%29.

Search

The message body must have an entry with the key filter. The value must be a String representing a valid LDAP filter, see http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Search_and_Compare.

Bind

The message body must have an entry with the key attributes. The value must be an instance of javax.naming.directory.Attributes This entry specifies the LDAP node to be created.

Unbind

No further entries necessary, the node with the specified dn is deleted.

Key definitions

In order to avoid spelling errors, the following constants are defined in org.apache.camel.springldap.SpringLdapProducer:

	public static final String DN = "dn"
	public static final String FILTER = "filter"
	public static final String ATTRIBUTES = "attributes"





Change Notification Preferences

View Online
|
View Changes
|
Add Comment









svn commit: r1451104 - /camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java

2013-02-27 Thread davsclaus
Author: davsclaus
Date: Thu Feb 28 05:45:49 2013
New Revision: 1451104

URL: http://svn.apache.org/r1451104
Log:
Polished

Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java?rev=1451104r1=1451103r2=1451104view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java
 Thu Feb 28 05:45:49 2013
@@ -103,8 +103,7 @@ public class ValidatingProcessor impleme
 
 if (shouldUseHeader()) {
 if (source == null  isFailOnNullHeader()) {
-throw new NoXmlHeaderValidationException(exchange,
-headerName);
+throw new NoXmlHeaderValidationException(exchange, 
headerName);
 }
 } else {
 if (source == null  isFailOnNullBody()) {




svn commit: r852352 - in /websites/production/camel/content: book-component-appendix.html book-pattern-appendix.html content-enricher.html spring-ldap.html validation.html

2013-02-27 Thread buildbot
Author: buildbot
Date: Thu Feb 28 06:27:17 2013
New Revision: 852352

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-pattern-appendix.html
websites/production/camel/content/content-enricher.html
websites/production/camel/content/spring-ldap.html
websites/production/camel/content/validation.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 Feb 28 
06:27:17 2013
@@ -15913,8 +15913,7 @@ spring-integration:defaultChannelName[?o
 ullia shape=rect href=configuring-camel.html title=Configuring 
CamelConfiguring Camel/a/lilia shape=rect href=component.html 
title=ComponentComponent/a/lilia shape=rect href=endpoint.html 
title=EndpointEndpoint/a/lilia shape=rect 
href=getting-started.html title=Getting StartedGetting 
Started/a/li/ul
 
 h2a shape=rect 
name=BookComponentAppendix-SpringLDAPComponent/aSpring LDAP Component/h2
-
-pemavailable since: 2.11/em/p
+pbAvailable since Camel 2.11/b/p
 
 pThe bspring-ldap:/b component provides a Camel wrapper for a 
shape=rect class=external-link href=http://www.springsource.org/ldap; 
rel=nofollowSpring LDAP/a./p
 
@@ -17127,7 +17126,7 @@ validator:someLocalOrRemoteResource
 
 h3a shape=rect name=BookComponentAppendix-Options/aOptions/h3
 div class=confluenceTableSmalldiv class=table-wrap
-table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Option /thth colspan=1 rowspan=1 
class=confluenceTh Default /thth colspan=1 rowspan=1 
class=confluenceTh Description /th/trtrtd colspan=1 rowspan=1 
class=confluenceTd ttresourceResolver/tt /tdtd colspan=1 
rowspan=1 class=confluenceTd ttnull/tt /tdtd colspan=1 
rowspan=1 class=confluenceTd bCamel 2.9:/b Reference to a 
ttorg.w3c.dom.ls.LSResourceResolver/tt in the a shape=rect 
href=registry.html title=RegistryRegistry/a. /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd ttuseDom/tt /tdtd 
colspan=1 rowspan=1 class=confluenceTd ttfalse/tt /tdtd 
colspan=1 rowspan=1 class=confluenceTd Whether 
ttDOMSource/tt/ttDOMResult/tt or ttSaxSource/tt/ttSaxResult/tt 
should be used by the validator. /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd ttus
 eSharedSchema/tt /tdtd colspan=1 rowspan=1 class=confluenceTd 
tttrue/tt /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 
2.3:/b Whether the ttSchema/tt instance should be shared or not. This 
option is introduced to work around a a shape=rect class=external-link 
href=http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6773084; 
rel=nofollowJDK 1.6.x bug/a. Xerces should not have this issue. 
/td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
ttfailIfNoBody/tt /tdtd colspan=1 rowspan=1 class=confluenceTd 
tttrue/tt /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 
2.9.5/2.10.3:/b Whether to fail if no body exists. /td/tr/tbody/table
+table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Option /thth colspan=1 rowspan=1 
class=confluenceTh Default /thth colspan=1 rowspan=1 
class=confluenceTh Description /th/trtrtd colspan=1 rowspan=1 
class=confluenceTd ttresourceResolver/tt /tdtd colspan=1 
rowspan=1 class=confluenceTd ttnull/tt /tdtd colspan=1 
rowspan=1 class=confluenceTd bCamel 2.9:/b Reference to a 
ttorg.w3c.dom.ls.LSResourceResolver/tt in the a shape=rect 
href=registry.html title=RegistryRegistry/a. /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd ttuseDom/tt /tdtd 
colspan=1 rowspan=1 class=confluenceTd ttfalse/tt /tdtd 
colspan=1 rowspan=1 class=confluenceTd Whether 
ttDOMSource/tt/ttDOMResult/tt or ttSaxSource/tt/ttSaxResult/tt 
should be used by the validator. /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd ttus
 eSharedSchema/tt /tdtd colspan=1 rowspan=1 class=confluenceTd 
tttrue/tt /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 
2.3:/b Whether the ttSchema/tt instance should be shared or not. This 
option is introduced to work around a a shape=rect class=external-link 
href=http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6773084; 
rel=nofollowJDK 1.6.x bug/a. Xerces should not have this issue. 
/td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
ttfailIfNoBody/tt /tdtd colspan=1 rowspan=1 class=confluenceTd 
tttrue/tt /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 
2.9.5/2.10.3:/b Whether to fail if no body exists. /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd ttheaderName/tt /tdtd 
colspan=1 rowspan=1 class=confluenceTd ttnull/tt /tdtd 
colspan=1 rowspan=1 class=confluenceTd bCamel 2.11:/b To validate 
against a header instead of the message
  body. /td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
ttfailOnNullHeader/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd tttrue/tt /tdtd colspan=1 rowspan=1 
class=confluenceTd 

[CONF] Apache Camel Camel 2.11.0 Release

2013-02-27 Thread confluence







Camel 2.11.0 Release
Page edited by Claus Ibsen


 Changes (3)
 




...
* [Bindy] FixedLengthRecord is improved with support for header and footer records, delimited fields, and field lengths defined within a record. * Added {{transacted}} option to [Hazelcast SEDA consumer|Hazelcast Component] to use Hazelcast transaction. 
* Added [{{spring-ldap}} component|https://cwiki.apache.org/confluence/display/CAMEL/Spring+LDAP]. 
* Improved performance of [Simple] and [Bean] language when using OGNL _expression_, by leveraging an internal cache to avoid introspecting the same types over and over again. 
* Camel now validates better when using [Try Catch Finally] in the routes has been configured properly. 
  
...
* {{[camel-servletlistener|ServletListener Component]}} - for bootstrapping Camel in web applications, without the need for Spring Framework etc. * {{[camel-sjms|sjms]}} - for Springless JMS integration 
* {{[spring-ldap|Spring LDAP]}} - for LDAP integration using the Spring LDAP template offering more functionality than existing [LDAP] component. 
* {{[camel-urlrewrite|UrlRewrite]}} - for bridging http endpoints and using the [UrlRewriteFilter|http://code.google.com/p/urlrewritefilter/] project to control url mappings. * {{[camel-xmlrpc|xmlrpc]}} - for talking to xmlrpc server from Camel. 
...


Full Content

Camel 2.11.0 release (currently in progress)




New and Noteworthy

Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: 


	Added Binding support, so it is easy to combine things like a Data Format to an Endpoint for easier composition of routes.
	Added support for SOAP 1.2 in SOAP data format.
	Cache operation for add/update now supports expiry headers to control time to live/idle/eternal.
	Added allowNullBody option to JMS to configure whether sending messages with no body is allowed.
	Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism.
	Added support for daily and weekly trends to Twitter component.
	The Camel Maven Archetypes now generates projects without any license headers.
	Added rejectOld option to the Resequencer to prevent out of order messages from being delivered after capacity/timeout events occur
	Further optimized XPath under concurrent load, and as well ensured resources are cleaned up eagerly
	Added options allowNullBody and readLockMinLength to the File and FTP components.
	Made changed read lock strategy on FTP go faster (eg when the FTP server has a lot of files in the directory) if you enable the fastExistsCheck=true option as well. Notice that some FTP server may not support this.
	HL7 moves to HAPI 2.0 and supports using a dedicated Parser instance in the HL7 MLLP codec and DataFormat. Added "Terser" language and _expression_ to be able to extract fields from a parsed message. HL7 now uses Apache Mina 2.x.
	Add an option HttpMethodRestrict to restrict HTTP method in Jetty and SERVLET
	Add support for selection of DirectVM consumers by using ant-like path _expression_.
	The POJO Producing, and POJO Consuming with @Consume, @Produce, @EndpointInject now supports a new {{property} attribute to get the endpoint configuration from a bean property (eg using a getter method); this allows you to configure this on the bean using conventional bean configuration.
	Testing with camel-test-blueprint on Windows no longer tries to cleanup after testing taking up 5 seconds and logging WARNs.
	The File, and FTP components now support fileExist=Move option to move any existing files before writing a file.
	Added option loadStatisticsEnabled on Camel JMX to allow to disable load statistics if not needed (avoids a background thread being in use, to calculate the load stats).
	Enabled "lazy connections" for XMPP providers via the testConnectionOnStartup option
	Added a connection monitor to detect and fix dropped XMPP consumer connections at configurable connectionPollDelay intervals
	Added an org.apache.camel.builder.ExchangeBuilder to build the Exchange using a builder pattern.
	The Camel Run Maven Goal can now run CDI applications.
	The Camel CDI component has improved a lot.
	Added option allowRedeliveryWhileStopping to error handlers to control if redelivery is allowed during stopping/shutting down Camel or the route(s). Turning this option false allows to stop quicker by rejecting redelivery attempts.
	Added support for specifying user info in Camel Endpoint urls, which contains the @ sign; now the @ sign can be given as is; without being 

svn commit: r1451119 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/model/ components/camel-spring/src/test/java/org/apache/camel/spring/processor/ components/camel-spring/src/test/resou

2013-02-27 Thread davsclaus
Author: davsclaus
Date: Thu Feb 28 07:04:19 2013
New Revision: 1451119

URL: http://svn.apache.org/r1451119
Log:
CAMEL-6109: Camel now validates if try catch finally has been mis configured 
when used in routes.

Added:

camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMisconfiguredTest.java
  - copied, changed from r1451097, 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.java

camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryCatchMisconfiguredFinallyTest.xml

camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryCatchMisconfiguredTest.xml
  - copied, changed from r1451097, 
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.xml
Modified:

camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java

camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java

camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryDefinition.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java?rev=1451119r1=1451118r2=1451119view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java
 Thu Feb 28 07:04:19 2013
@@ -95,6 +95,11 @@ public class CatchDefinition extends Pro
 throw new IllegalArgumentException(At least one Exception must be 
configured to catch);
 }
 
+// parent must be a try
+if (!(getParent() instanceof TryDefinition)) {
+throw new IllegalArgumentException(This doCatch should have a 
doTry as its parent on  + this);
+}
+
 // do catch does not mandate a child processor
 Processor childProcessor = this.createChildProcessor(routeContext, 
false);
 

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java?rev=1451119r1=1451118r2=1451119view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java
 Thu Feb 28 07:04:19 2013
@@ -49,6 +49,11 @@ public class FinallyDefinition extends O
  
 @Override
 public Processor createProcessor(RouteContext routeContext) throws 
Exception {
+// parent must be a try
+if (!(getParent() instanceof TryDefinition)) {
+throw new IllegalArgumentException(This doFinally should have a 
doTry as its parent on  + this);
+}
+
 // do finally does mandate a child processor
 return this.createChildProcessor(routeContext, true);
 }

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryDefinition.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryDefinition.java?rev=1451119r1=1451118r2=1451119view=diff
==
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryDefinition.java 
(original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryDefinition.java 
Thu Feb 28 07:04:19 2013
@@ -20,7 +20,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -89,6 +88,11 @@ public class TryDefinition extends Outpu
 }
 }
 
+// must have either a catch or finally
+if (finallyClause == null  catchClauses == null) {
+throw new IllegalArgumentException(doTry must have one or more 
catch or finally blocks on  + this);
+}
+
 return new TryProcessor(tryProcessor, catchProcessors, 
finallyProcessor);
 }
 

Copied: 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMisconfiguredTest.java
 (from r1451097, 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.java)
URL: 

svn commit: r852357 - /websites/production/camel/content/camel-2110-release.html

2013-02-27 Thread buildbot
Author: buildbot
Date: Thu Feb 28 07:26:41 2013
New Revision: 852357

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/camel-2110-release.html

Modified: websites/production/camel/content/camel-2110-release.html
==
--- websites/production/camel/content/camel-2110-release.html (original)
+++ websites/production/camel/content/camel-2110-release.html Thu Feb 28 
07:26:41 2013
@@ -84,7 +84,8 @@
 
 pWelcome to the 2.11.0 release with approximately XXX issues resolved - 
including new features, improvements, and bug fixes, such as: /p
 
-ulliAdded a shape=rect href=binding.html title=BindingBinding/a 
support, so it is easy to combine things like a a shape=rect 
href=data-format.html title=Data FormatData Format/a to an a 
shape=rect href=endpoint.html title=EndpointEndpoint/a for easier 
composition of routes./liliAdded support for SOAP 1.2 in a shape=rect 
href=soap.html title=SOAPSOAP/a data format./lilia shape=rect 
href=cache.html title=CacheCache/a operation for add/update now supports 
expiry headers to control time to live/idle/eternal./liliAdded 
ttallowNullBody/tt option to a shape=rect href=jms.html 
title=JMSJMS/a to configure whether sending messages with no body is 
allowed./liliAdded ttconnectOnStartup/tt option to a shape=rect 
href=hdfs.html title=HDFSHDFS/a to allow to connect on demand, to avoid 
having Hadoop block for long time connecting to the HDFS cluster, as it has a 
hardcoded 15 minute retry mechan
 ism./liliAdded support for daily and weekly trends to a shape=rect 
href=twitter.html title=TwitterTwitter/a component./liliThe a 
shape=rect href=camel-maven-archetypes.html title=Camel Maven 
ArchetypesCamel Maven Archetypes/a now generates projects without any 
license headers./liliAdded ttrejectOld/tt option to the a shape=rect 
href=resequencer.html title=ResequencerResequencer/a to prevent out of 
order messages from being delivered after capacity/timeout events 
occur/liliFurther optimized a shape=rect href=xpath.html 
title=XPathXPath/a under concurrent load, and as well ensured resources 
are cleaned up eagerly/liliAdded options ttallowNullBody/tt and 
ttreadLockMinLength/tt to the a shape=rect href=file2.html 
title=File2File/a and a shape=rect href=ftp2.html 
title=FTP2FTP/a components./liliMade ttchanged/tt read lock 
strategy on a shape=rect href=ftp2.html title=FTP2FT
 P/a go faster (eg when the FTP server has a lot of files in the directory) 
if you enable the ttfastExistsCheck=true/tt option as well. Notice that 
some FTP server may not support this./lilia shape=rect href=hl7.html 
title=HL7HL7/a moves to HAPI 2.0 and supports using a dedicated Parser 
instance in the a shape=rect href=hl7.html title=HL7HL7/a MLLP codec 
and DataFormat. Added Terser language and expression to be able to extract 
fields from a parsed message. a shape=rect href=hl7.html 
title=HL7HL7/a now uses Apache Mina 2.x./liliAdd an option 
ttHttpMethodRestrict/tt to restrict HTTP method in a shape=rect 
href=jetty.html title=JettyJetty/a and a shape=rect 
href=servlet.html title=SERVLETSERVLET/a/liliAdd support for 
selection of a shape=rect href=direct-vm.html 
title=Direct-VMDirect-VM/a consumers by using ant-like path 
expression./liliThe a shape=rect href=pojo-producing.html title=P
 OJO ProducingPOJO Producing/a, and a shape=rect 
href=pojo-consuming.html title=POJO ConsumingPOJO Consuming/a with 
@Consume, @Produce, @EndpointInject now supports a new {{property} attribute to 
get the endpoint configuration from a bean property (eg using a getter method); 
this allows you to configure this on the bean using conventional bean 
configuration./liliTesting with ttcamel-test-blueprint/tt on Windows no 
longer tries to cleanup after testing taking up 5 seconds and logging 
WARNs./liliThe a shape=rect href=file2.html title=File2File/a, 
and a shape=rect href=ftp2.html title=FTP2FTP/a components now 
support ttfileExist=Move/tt option to move any existing files before 
writing a file./liliAdded option ttloadStatisticsEnabled/tt on a 
shape=rect href=camel-jmx.html title=Camel JMXCamel JMX/a to allow to 
disable load statistics if not needed (avoids a background thread being in use, 
to calculate the load st
 ats)./liliEnabled lazy connections for a shape=rect href=xmpp.html 
title=XMPPXMPP/a providers via the tttestConnectionOnStartup/tt 
option/liliAdded a connection monitor to detect and fix dropped a 
shape=rect href=xmpp.html title=XMPPXMPP/a consumer connections at 
configurable ttconnectionPollDelay/tt intervals/liliAdded an 
ttorg.apache.camel.builder.ExchangeBuilder/tt to build the a shape=rect 
href=exchange.html title=ExchangeExchange/a using a builder 
pattern./liliThe a shape=rect href=camel-run-maven-goal.html 
title=Camel Run Maven GoalCamel Run Maven Goal/a can now run a 
shape=rect href=cdi.html title=CDICDI/a applications./liliThe 
Camel a shape=rect href=cdi.html