Hi

No transaction only works with resources which naturally supports
transactions. In reality this is often only limited to RDBMS and JMS
or the likes.
So email and file does not support transactions.

If you send an email, its sent.
If you write a file, its written.

However you can implement custom compensation logic to do work like a rollback.
For example to delete the written file, etc.

If you got the Camel in Action book, then chapter 9 is all about
transaction and compensations.


On Fri, Dec 16, 2011 at 4:34 PM, Justin Rosenberg
<rosenbe...@crlcorp.com> wrote:
> Does the File and Email endpoint require a JMS transaction provider to
> do transactions or can it use JTA instead?
>
>
> ~Justin
>
>
> -----Original Message-----
> From: Justin Rosenberg [mailto:rosenbe...@crlcorp.com]
> Sent: Tuesday, December 06, 2011 7:47 PM
> To: users@camel.apache.org
> Subject: Mail component ContentTypeResolver SPI customization
>
> I'm having trouble understanding how to use a custom ContentTypeResolver
> for the mail component using Spring.
>
> Here is my Spring XML:
> <camel:camelContext
> id="CamelContext-${project.artifactId}_${project.version}">
>  <camel:contextScan />
> </camel:camelContext>
> <bean id="mail" class="org.apache.camel.component.mail.MailComponent">
>  <property name="contentTypeResolver">
>    <bean class="com.crlcorp.oasis.routing.util.CRLContentTypeResolver"
> />
>  </property>
> </bean>
>
> I'm retrieving the attachment in the processor as follows:
> DataHandler dh =
> exchange.getIn().getAttachments().values().iterator().next();
> String contentType = dh.getContentType();
>
> For testing I have the ContentTypeResolver always return the same value.
> However, the value that gets returned by dh.getContentType() is
> "APPLICATION/OCTET-STREAM; name="file.pdf"
> Am I missing a step to get the CamelContext to recognize the customized
> MailComponent?  I have tried using the same Spring XML setting the value
> on the MailEndpoint as well.
>
> Application versions:
> Camel 2.7.0
> Spring 3.0.5.RELEASE
>
> Any help is appreciated.
>
> Cheers,
>
> ~Justin
>
>
>
>
> CONFIDENTIALITY NOTICE:
> The information in this message, and any attachment, is intended for the
>
> sole use of the individual and entity to whom it is addressed. This
> information may be privileged, confidential, and protected from
> disclosure. If you are not the intended recipient you are hereby
> notified
> that you have received this communication in error and that any review,
> disclosure, dissemination, distribution or copying of it, or its
> contents,
> is strictly prohibited. If you think that you have received this message
>
> in error please notify the sender and destroy all copies of this
> communication and any attachments. Thank you.
>
> CONFIDENTIALITY NOTICE:
> The information in this message, and any attachment, is intended for the
> sole use of the individual and entity to whom it is addressed. This
> information may be privileged, confidential, and protected from
> disclosure. If you are not the intended recipient you are hereby notified
> that you have received this communication in error and that any review,
> disclosure, dissemination, distribution or copying of it, or its contents,
> is strictly prohibited. If you think that you have received this message
> in error please notify the sender and destroy all copies of this
> communication and any attachments. Thank you.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to