Since Apache Camel version 2.0, the following changes have been made to the File and the FTP components:
Only a directory name can be specified directly in the endpoint, not a filename. In other words, you must specify a File endpoint with the syntax,
file:and an FTP component with the syntax,directoryName[?options]ftp://[. It is still possible to select individual files, however, by appending theusername@]hostname[:port]/directoryname[?options]fileNameoption, which enables you to specify files using the file expression language.File producer endpoints and FTP producer endpoints now overwrite existing files by default (previously, the default behavior was to append to files).You can use the new
fileExistoption to specify what happens when a producer attempts to write a file that already exists. Valid values for thefileExistoption are:Override,Append,Fail, orIgnore.
![]() | Important |
|---|---|
Both the File component and the FTP component have been extensively rewritten in Apache Camel 2.0. In particular, many of the component options have been renamed or modified. It is recommended that you check the configuration of your File and FTP endpoints against the latest component documentation—see File2 in EIP Component Reference and FTP2 in EIP Component Reference. |
Since Apache Camel 2.8, the default value of the useFixedDelay option has
changed from false to true.
Since Apache Camel 2.10, you can use the charset option on the File component
to specify the character encoding to use for reading and writing files.
The JMS correlationId is determined differently to before. Now, JMS always
uses the messageId as the correlationId, if configured to do so by
setting useMessageIDAsCorrelationID to true. If the setting is
false, the JMSCorrelationID header value is used, if present,
and the messageId value is used as a fallback, if the header is not
present.
Since Apache Camel version 2.5, the following changes have been made to the JMS component:
The JMS 1.0.2 API is no longer supported.
Durable topic subscribers now must provide a
clientIdvalue, otherwise Apache Camel fails fast on start-up.
Since Apache Camel version 2.6, a URI of the form,
jms:queue:Foo?replyTo=FooReply&preserveMessageQos=true, can be used to
set the JMSReplyTo header in the outgoing message, even if the
Exchange has an InOnly MEP. In previous Apache Camel
versions, the URI replyTo option was ignored for InOnly
exchanges. For more details, see JmsProducer in EIP Component Reference.
Since Apache Camel version 2.8, the default cache level has changed for JMS endpoints, from
CACHE_CONSUMER to CACHE_AUTO. When transactions are enabled,
CACHE_AUTO resolves to CACHE_NONE (caching disabled), in order
to guarantee compatibility with XA transactions. If you do not use XA
transactions, however, it is strongly recommended that you set the
caching level explicitly to CACHE_CONSUMER to improve performance. For more
details, see Configuring the JMS Component in EIP Transaction Guide.
The Bean component now enforces stricter matching of bean method parameters. Previously,
if a parameter could not be converted to the appropriate type, it was passed as
null. Now, all parameters must be convertible to the relevant types.
The allowMultipleConsumers option has been removed. A Direct endpoint can
now have only one consumer.
Since Apache Camel version 2.2, HTTP proxy configuration is set using
CamelContext properties instead of Java system properties.
Since Apache Camel version 2.3, the HTTP authentication options have been renamed, to avoid
clashing with the username and password URI parameters.
Authentication is now set using the authUsername, authPassword,
and authDomain options. In addition, you must specify the authentication method
using the authMethod option, which can take the values Basic,
Digest, or NTLM.
For the full list of HTTP authentication options, see HTTP in EIP Component Reference.
Since Apache Camel 2.0, these components support request/reply semantics. Endpoints of SEDA or VM type will wait for a reply, if a reply is expected.
Since Apache Camel 2.3, the size of the SEDA queue (which holds incoming exchanges) is unbounded, whereas previously it had a maximum size of 1000.
Since Apache Camel version 2.3, the header key,
MinaConsumer.HEADER_CLOSE_SESSION_WHEN_COMPLETE, is replaced by
MinaConstants.MINA_CLOSE_SESSION_WHEN_COMPLETE.
Since Apache Camel version 2.3, the Jetty component has been upgraded from Jetty 6.1.22 to Jetty 7.0.1. The Jetty API has changed significantly between these two versions. Because Jetty is now hosted at Eclipse, all Java packages have been renamed. If you use the Jetty API directly, you could use the Jetty 6 to Jetty 7 migration tool from Eclipse to simplify the migration of your source code.
Since Apache Camel version 2.3, the CXF component's PAYLOAD mode has been
improved to delegate all SOAP message parsing to CXF.
Since Apache Camel version 2.7, when using POJO data format, the CXF message attachments are
not copied to the attachment properties of the
In message—which means it is no longer possible to access a CXF
attachment by calling org.apache.camel.Message.getAttachment(). But the
attachments are still accessible from the message body. This avoids the problem affecting
earlier versions of Apache Camel, where the attachments must be explicitly cleared on the
message, in order to avoid being copied into the CXF response.
Since Apache Camel version 2.8, the Camel transport for CXF and the cxfbean
component have been moved from the camel-cxf artifact to the
camel-cxf-transport artifact. If you need to use either of these components,
you must a Maven dependency on the camel-cxf-transport artifact.
Since Apache Camel version 2.4, the following changes have been made to the FTP component:
The
ftpsdefault port has been changed from 2222 to 21.The
ftpsprotocol now uses a secure data channel while transferring files, whereas previously only secure login was enabled. You can now use thedisableSecureDataChannelDefaults,execProt, andexecPbszoptions to customize the behavior of the security channel. See FTP2 in EIP Component Reference for details.The FTP base directory can now be specified using an absolute path. In the endpoint URI, insert two leading forward slashes,
//, to specify an absolute path, as inftp:admin@someserver//absolutePath/foo/bar?password=secret.The FTP component now uses a 10 second default connect timeout (for all protocols) and a 30 second data timeout (for the
ftpandftpsprotocols only).
Since Apache Camel version 2.5, the following changes have been made to the FTP component:
FTP consumer endpoints now traverse the file structure in a different way. It is recommended that you test any applications with FTP consumer endpoints to ensure that they are not affected by this change.
Since Apache Camel 2.5, the timeout option on the Netty component has been
removed, because it did not work properly.
Since Apache Camel 2.10, the corePoolSize and maxPoolSize thread
pool options have been removed.
Since Apache Camel 2.10, the API for the ClientPipelineFactory and
ServerPipelineFactory abstract classes has changed.
Since Apache Camel 2.5, if you are using the Quartz component with jobs persisted in a database, you should note that Apache Camel now resolves job names based on the endpoint URI without parameters. This makes it possible to change cron parameters on the same job (that is, to reschedule the job).
Since Apache Camel 2.6, the Quartz component enforces that the trigger group/trigger name combination is unique within a given component instance and throws an exception, if a name clash is detected. This does not apply to clustered quartz, however.
Since Apache Camel 2.6, the mediaSize option on the Printer component uses
exactly the same constants as the Java printer API; that is, underscores are used instead of
hyphens in the constants.
Since Apache Camel 2.6, when using the JPA component to store trace information generated by
the Apache Camel trace interceptor, the JpaTraceEventMessage class now attaches the
@Lob annotation to any fields that could contain a lot of data, such as a
message body. This ensures that these large data fields are persisted as CLOB/BLOB JDBC
fields (and thus avoids truncating the data).
Since Apache Camel 2.9, the JPA component has been upgraded from using the JPA1 specification to use JPA2 specification.
Since Apache Camel 2.7, the Servlet component does not automatically start up a Spring
context any more. Hence, if you define your routes using a Spring configuration file, you
must start up a Spring context explicitly. For example, if you are deploying a Apache Camel
application as a Web application (.war file), the standard approach to starting
a Spring context is to create a ContextLoaderListener instance in the
web.xml file, as follows:
<web-app ...>
<display-name>My Web Application</display-name>
<!-- location of spring xml files -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:camel-config.xml</param-value>
</context-param>
<!-- the listener that kick-starts Spring -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Camel servlet -->
...
</web-app>Where camel-config.xml is the Spring configuration file located on the
classpath. For full details of how to deploy such a servlet application, see the
examples/camel-example-servlet-tomcat demonstration.
Since Apache Camel 2.7, the JDBC aggregator component has been incorporated into the SQL component. See Using the JDBC based aggregation repository in EIP Component Reference for details.
Since Apache Camel 2.8, the header names used by the cache component have changed, so that
they are now prefixed by CamelCache. The headers are now:
CamelCacheGet, CamelCacheCheck, CamelCacheAdd,
CamelCacheUpdate, CamelCacheDelete, and
CamelCacheDeleteAll.
The headers are now removed from the exchange, after the caching has been performed.
Since Apache Camel 2.8, the options for configuring HTTP Basic Authentication and HTTP Proxies have different names. See HTTP4 in EIP Component Reference for details.
The Log in EIP Component Reference component no longer shows
stream message bodies by default, but you can use the new showStreams option to
enable that behavior. Likewise the Log component does not automatically convert the payload
to the StreamCache type. For that you need to explicitly enable stream caching
on the route or on the Camel context.
Since Apache Camel 2.8, the CamelBeanMethodName header is removed after an
exchange passes through a Bean endpoint.
Since Apache Camel 2.9, the CSV component always returns the List<List >
type, even if only one row is returned, in order to be more consistent.
Since Apache Camel 2.9, the Validation component has been moved from
camel-spring to camel-core as it no longer depends on Spring
JARs.
Since Apache Camel 2.9, the XSLT component has been moved from camel-spring to
camel-core as it no longer depends on Spring JARs.
Since Apache Camel 2.9, the Mail component no longer depends on the Spring APIs. Any custom
JavaMailSender class must now implement
org.apache.camel.component.mail.JavaMailSender instead of the corresponding
Spring interface.
Since Apache Camel 2.10, the Mail component excludes the dependency on the
javax.activation JAR, because that dependency is embedded in the JVM from
Java 6 onwards.
Since Apache Camel 2.9, the QuickFix component no longer depends on the Spring APIs. If you
want to use the XML DSL to set up QuickFix, you must now use the
QuickfixjConfiguration class in place of the
QuickfixjSettingsFactory class. For more details, see Quickfix.
Since Apache Camel 2.10, the resourceClasses option no longer recognizes the
semicolon character, ;, as a separator for class names. Use the comma
character, ,, instead.






![[Important]](imagesdb/important.gif)


