Re: Unabel to decrypt Camel PGP encrypted file with PGP Tools

2013-03-04 Thread Willem jiang
Can you try the latest Camel 2.11-SNAPSHOT?
You can change the file name by using the message header CamelFileName.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 5, 2013 at 2:10 PM, frank.edward wrote:

> One of our clients complained me that they are not able to decrypt the PGP
> encrypted file. I encrypted the file using Camel PGPDataFormat.  
> I try to decrypt in my local and I am able to decrypt. After debugging the
> details process, I came to realize that there is one hard code part in
> PGPDataFormat.marshal() method.
> During encryption PGPDataFormat called PGPDataFormatUtil.compress() method
> by passing the hardcode value of "_CONSOLE" as a filename.
> Due to this part, if we try to decrypt the file within Java code, we are
> able to decrypt the file. However when client try to decrypt the file using
> PGP Tools (I don't know which PGP Tool they are using) and generate the
> result file, they are not able to generate the file due to output format is
> hardcoded to _CONSOLE.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Unabel-to-decrypt-Camel-PGP-encrypted-file-with-PGP-Tools-tp5728533.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: XMPP sender implementation for multiuserchat

2013-03-04 Thread Willem jiang
Hi,

Are you just using one account to send message ?

I guess you can improve the performance if you can reuse the connection.  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 5, 2013 at 1:42 PM, namita wrote:

> I am using Multi user chat in openfire server (XMPP connection).But sender is
> very slow.It sends 200 message in a minute.help will be appreciated..
>  
> ConnectionConfiguration config = new ConnectionConfiguration(
> getServerName(), getServerPort());
> XMPPConnection connection = new XMPPConnection(config);
> connection.connect();
> connection.login(getUserName(), getPassword());
> MultiUserChat multiUserChat = null;
>  
> multiUserChat = new MultiUserChat(connection,
> getConferenceRoomName() + "@conference." +  
> getServerName());
> multiUserChat.join(getUserName(), getPassword());
>  
> multiUserChat.sendMessage(message);
>  
> if (LOGGER.isDebugEnabled()) {
> LOGGER.debug("Message Sent succesfully");
> }
>  
> I am calling this code from another code..Its damn slow.Its able to send 200
> msg in a min.I want 10 in a min. How to enhance it?On receiver side i am
> using camel xmpp.I am saving it in a DB.Saving receiving and DataBase
> insertion happening same time.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/XMPP-sender-implementation-for-multiuserchat-tp5728532.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Unabel to decrypt Camel PGP encrypted file with PGP Tools

2013-03-04 Thread frank.edward
One of our clients complained me that they are not able to decrypt the PGP
encrypted file. I encrypted the file using Camel PGPDataFormat. 
I try to decrypt in my local and I am able to decrypt. After debugging the
details process, I came to realize that there is one hard code part in
PGPDataFormat.marshal() method.
During encryption PGPDataFormat called PGPDataFormatUtil.compress() method
by passing the hardcode value of "_CONSOLE" as a filename.
Due to this part, if we try to decrypt the file within Java code, we are
able to decrypt the file. However when client try to decrypt the file using
PGP Tools (I don't know which PGP Tool they are using) and generate the
result file, they are not able to generate the file due to output format is
hardcoded to _CONSOLE.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Unabel-to-decrypt-Camel-PGP-encrypted-file-with-PGP-Tools-tp5728533.html
Sent from the Camel - Users mailing list archive at Nabble.com.


XMPP sender implementation for multiuserchat

2013-03-04 Thread namita
I am using Multi user chat in openfire server (XMPP connection).But sender is
very slow.It sends 200 message in a minute.help will be appreciated..

   ConnectionConfiguration config = new ConnectionConfiguration(
 getServerName(), getServerPort());
 XMPPConnection connection = new XMPPConnection(config);
 connection.connect();
 connection.login(getUserName(), getPassword());
MultiUserChat multiUserChat = null;

multiUserChat = new MultiUserChat(connection,
getConferenceRoomName() + 
"@conference." +  
getServerName());
multiUserChat.join(getUserName(), getPassword());

multiUserChat.sendMessage(message);

if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Message Sent succesfully");
}

I am calling this code from another code..Its damn slow.Its able to send 200
msg in a min.I want 10 in a min. How to enhance it?On receiver side i am
using camel xmpp.I am saving it in a DB.Saving receiving and DataBase
insertion happening same time.



--
View this message in context: 
http://camel.465427.n5.nabble.com/XMPP-sender-implementation-for-multiuserchat-tp5728532.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Opposite of split

2013-03-04 Thread Christian Müller
Sorry, I mean this one:
https://github.com/muellerc/apachecon-na-2013/tree/master/file-component

Sent from a mobile device
Am 04.03.2013 22:16 schrieb "Christian Müller" :

> Have a look into this project:
> https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
>
> Sent from a mobile device
> Am 04.03.2013 11:36 schrieb "jeff" :
>
>> Thks Claus for the answer, but I have not found the simplest way to do a
>> simple:
>>
>> from("file://input")
>> .split()
>> .tokenize("\n")
>> .unmarshal
>> .bindy(BindyType.Csv, AED.class)
>> .bean(AEDProcessor.class, "processTicket")
>> .marshal()
>> .bindy(BindyType.Csv, AEDResult.class)
>> [?]
>> .to("file://output?fileName=${file:name}")
>>
>> The only way I found is to do a :
>>
>> .to("file://output?fileName=${file:name}&fileExist=Append")
>>
>> But it is too slow !
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>


Re: Opposite of split

2013-03-04 Thread Christian Müller
Have a look into this project:
https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component

Sent from a mobile device
Am 04.03.2013 11:36 schrieb "jeff" :

> Thks Claus for the answer, but I have not found the simplest way to do a
> simple:
>
> from("file://input")
> .split()
> .tokenize("\n")
> .unmarshal
> .bindy(BindyType.Csv, AED.class)
> .bean(AEDProcessor.class, "processTicket")
> .marshal()
> .bindy(BindyType.Csv, AEDResult.class)
> [?]
> .to("file://output?fileName=${file:name}")
>
> The only way I found is to do a :
>
> .to("file://output?fileName=${file:name}&fileExist=Append")
>
> But it is too slow !
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


[ANNOUNCE] Apache Camel 2.10.4 Released

2013-03-04 Thread hadrian
The Apache Camel project [1] is a powerful open source integration framework 
based on known Enterprise Integration Patterns [2]. 

The Camel community announces the immediate availability of the new patch 
release camel-2.10.4. This announcement is actually one week late as many of 
the committers were at ApacheCon NA 2013 in Portland. 

The artifacts are published and ready for you to download [3] either from the 
Apache mirrors or from the Central Maven repository.
For more details please take a look at the release notes [4].

Many thanks to the Camel community for the hard work.

Hadrian

[1] http://camel.apache.org/
[2] http://camel.apache.org/enterprise-integration-patterns.html
[3] http://camel.apache.org/download.html
[4] http://camel.apache.org/camel-2104-release.html


Re: @CsvRecord reject

2013-03-04 Thread Willem jiang
Can you double check the AED toString method?
I tried to write some unit test, but I could not reproduce the error that you 
got.

BTW, which version of Camel are  you using?
Did you try it with latest release Camel 2.10.4 ?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 5, 2013 at 1:09 AM, Jean Francois LE BESCONT wrote:

> Hey !  
>  
> I would like to bind a CSV content. But camel looks to do strange things.
>  
> My File : VDE_AED.csv is a simple UNIX file :  
>  
> bob;mazone4;01/12/2012;jack
> bob;mazone5;01/12/2012?;jack
> bob;mazone4;01/12/2012;jack
>  
> ( the second line has to be rejected)
>  
> I have a CSV Record :  
>  
> @CsvRecord(separator = ";" , crlf = "UNIX" )
> public class AED {
>  
> @DataField(pos = 1, required = true)
> private String nom = "";
>  
> @DataField(pos = 2, required = true)  
> private String zone = "";
>  
> @DataField(pos = 3, pattern = "dd/MM/", required = true)  
> private Date date = null;
>  
> @DataField(pos = 4, required = true)
> private String titulaire = "";
> [... get set tostring ]
>  
> And a simpliest route :  
>  
>  
>  
> errorHandler(deadLetterChannel("direct:error"));  
>  
> from("file://C:/Temp/camel?noop=true")
> .log("Ticket : ${body}")
> .split()
> .tokenize("\n")
> .unmarshal()
> .bindy(BindyType.Csv, AED.class)
> .log("Ticket in : ${body}")
> .marshal()
> .bindy(BindyType.Csv, AED.class)
> .log("end ${file:name}").end();
>  
>  
> from("direct:error").log("ERROR : '${body}' ").end();
>  
>  
>  
> - All my line are rejected when required = true for the first column :  
>  
> @DataField(pos = 1, required = true)
> private String nom = "";
>  
> - When @DataField(pos = 1, required = false)  
> private String nom = "";
>  
>  
>  
> Correct line are bindy except the first column which stay null.
>  
>  
> [read #5 - file://C:/Temp/camel] route1 INFO Ticket : 
> bob;mazone4;01/12/2012;jack
> bob;mazone5;01/12/2012?;jack
> bob;mazone4;01/12/2012;jack
>  
> [read #5 - file://C:/Temp/camel] route1 INFO Ticket in : Descripteur [nom=, 
> zone=mazone4, date=Sat Dec 01 00:00:00 CET 2012, titulaire=jack]
> [read #5 - file://C:/Temp/camel] route1 INFO Fin traitement VDE_AED.csv
> [read #5 - file://C:/Temp/camel] route2 INFO ERROR : 
> 'bob;mazone5;01/12/2012?;jack'  
> [read #5 - file://C:/Temp/camel] route1 INFO Ticket in : Descripteur [nom=, 
> zone=mazone4, date=Sat Dec 01 00:00:00 CET 2012, titulaire=jack]
> [read #5 - file://C:/Temp/camel] route1 INFO Fin traitement VDE_AED.csv
>  
>  
>  
>  
> By the way I am using camel 2.10.3
>  
> Strange isn't it ?  
>  
>  
> Attachments:  
> - VDE_AED.csv
>  
>  





Re: Login/session token with Camel/CXF

2013-03-04 Thread Willem jiang
FYI, I just updated the code of InsertResponseOutHeaderProcessor.java to avoid 
the NPE issue


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 5, 2013 at 2:11 AM, kingolego wrote:

> sothach wrote
> > I need to integrate with a third party system via its WS interface. To
> > send a request, I must first "login" to the server, and obtain an
> > authentication token to attach to all subsequent requests. This token has
> > a limited shelf-life, and will time-out after a period of time, requiring
> > me to re-apply.
> > My question: is there a standard pattern in Camel for this scenario?  
> > My first thought is to implement this by having an enrichment stage, that
> > calls out to "direct:login" route, setting a header with the token, that
> > can then be used when marshaling the call.  
> > Is there a simpler way?
>  
>  
>  
> I am new to camel, but am facing the same problem and have chosen to use the
> enrichment pattern, mostly because I need to implement other, more
> "classical" enrichment scenarios. Interceptors are an alternative approach,
> but I think are not simpler, especially given the timeout and refresh
> requirements.
>  
> Two "bits" of information that may be helpful to you.  
>  
> The Enrich(er) resource is expected to implement the Producer interface.
> This may be obvious to an experienced Cameler, but I didn't see it
> documented and only discovered reading the Enricher source.
> 
>   
> The Enricher only exercises the process method of the Processor
> super-interface, however, not Service start and stop, at least in my
> configuration. I use a ProducerTemplate instance within the Producer
> implementation that is configured with the same endpoint as the regular
> messages.
>  
> This will not apply to you unless you use CXF messages in Pojo data format
> and "out-of-band" SOAP headers to send the authentication token, but the
> example code in  
> http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPOJOmode
>   
> is broken. If there are no existing headers, the example
> InsertResponseOutHeaderProcessor.process will throw a NullPointerException,
> mistakenly trying to use the QName from an existing header to create the new
> one.
>  
> I've been meaning to post an issue about this, but there it is
>  
> Otherwise, the Enrich is working well for me inside a basic proxy based on
> the camel examples, with routing based on the SOAP action/operation.
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Login-session-token-with-Camel-CXF-tp5728467p5728477.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: Opposite of split

2013-03-04 Thread Ryan Moquin
This may be a silly question, but maybe adding the streaming() method (I
think it goes on the split) might help?  It's possible the single load into
memory before doing the splitting, is slowing it down.  I found this link
helpful, in case you haven't seen it:

http://www.catify.com/2012/07/09/parsing-large-files-with-apache-camel/

Regards,
Ryan


On Mon, Mar 4, 2013 at 3:59 PM, Jean Francois LE BESCONT <
jflebesc...@gmail.com> wrote:

> I have try to us BodyInAggregatingStrategy in [] :
>
> .aggregate(header("CamelFileName"), new
> BodyInAggregatingStrategy()).completionTimeout(3000)
>
> But it is also slow ... 12 000 lines in 20 seconds, not possible for a
> mediation system...
>
>
> 2013/3/4 jeff 
>
> > Thks Claus for the answer, but I have not found the simplest way to do a
> > simple:
> >
> > from("file://input")
> > .split()
> > .tokenize("\n")
> > .unmarshal
> > .bindy(BindyType.Csv, AED.class)
> > .bean(AEDProcessor.class,
> "processTicket")
> > .marshal()
> > .bindy(BindyType.Csv, AEDResult.class)
> > [?]
> >
> .to("file://output?fileName=${file:name}")
> >
> > The only way I found is to do a :
> >
> > .to("file://output?fileName=${file:name}&fileExist=Append")
> >
> > But it is too slow !
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>


Re: ClassNotFoundException: org.apache.xalan.xsltc.trax.DOM2SAX

2013-03-04 Thread Christian Müller
You didn't tell us which version of Camel do you use.
You didn't tell us how your route looks like.
You didn't tell us which Xalan bundle do you added.
You didn't tell us in which runtime do you hit this issue.
We are not Guru's. ;-)

I suggest to read [1] first.

[1] http://camel.apache.org/support.html

Best,
Christian

On Mon, Mar 4, 2013 at 3:08 PM, Smith-John  wrote:

> Hi,
>
> I'm getting following exception after "invoking" my Route:
>
> 15:01:00.650  TRACE  org.apache.camel.util.ObjectHelper:815 Loading
> class: org.apache.xalan.xsltc.trax.DOM2SAX using classloader:
> org.eclipse.core.runtime.internal.adaptor.ContextFinder@eaf40c
> 15:01:00.650  TRACE  org.apache.camel.util.ObjectHelper:819 Cannot
> load class: org.apache.xalan.xsltc.trax.DOM2SAX using classloader:
> org.eclipse.core.runtime.internal.adaptor.ContextFinder@eaf40c
> java.lang.ClassNotFoundException: org.apache.xalan.xsltc.trax.DOM2SAX
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> ~[na:1.6.0_34]
> at java.security.AccessController.doPrivileged(Native Method)
> ~[na:1.6.0_34]
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> ~[na:1.6.0_34]
> ...
>
> Of course it's just TRACE log, but it doesn't look good.
> I tried adding org.apache.servicemix.bundles.xalan.jar and its dependencies
> but exception still exists.
> Any idea how to get rid of it?
> (Working with Equinox)
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/ClassNotFoundException-org-apache-xalan-xsltc-trax-DOM2SAX-tp5728455.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--


Re: camel-test-blueprint mocking

2013-03-04 Thread Ryan Moquin
Yep, I'm doing thay all correctly.  I meant (and I probably didn't phrase
it right) that if you look at the bundled camel blueprint example, it
doesn't use the camel-test-blueprint component for testing, it actually
uses spring-dm rather than blueprint.  For example, the following test,
which according to the dir name is a blueprint example, is tested using
camel's spring test support:

...\apache-camel-2.11-SNAPSHOT\examples\camel-example-cxf-blueprint\src\test\java\org\apache\camel\example\reportincident\ReportIncidentRoutesClientTest.java

public class ReportIncidentRoutesClientTest extends CamelSpringTestSupport {
...

I was hoping to find a blueprint example that mocks an endpoint,  My
blueprint test runs fine, my mocks just don't register that they received
any messages.

Ryan




On Sun, Mar 3, 2013 at 10:24 PM, Willem jiang wrote:

> If you are using camel-test-blueprint, it should have nothing to do with
> the spring-dm.
> Please make sure you are using camel-blueprint namespace to define the
> camel route.
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> (English)
>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Sunday, March 3, 2013 at 11:38 PM, Ryan Moquin wrote:
>
> > /I had converted my camel routes from using camel-test to
> > camel-test-blueprint. I switched to version 2.10.4 which prevents my
> camel
> > routes from being executed twice per test as I was seeing with
> > 2.11.0-SNAPSHOT, but I've been having trouble with mocking an endpoint
> and
> > skipping sending to the original.with camel-test-blueprint. I basically
> > just want to not have the ending http4 endpoint called.
> >
> > Also, no matter what endpoint I mock, the most doesn't register any
> > received messages. It always says it received 0 messages even though
> > messages were clearly sent to the original endpoint. Is there somewhere I
> > can look where that test component is used? Everything I've found seems
> to
> > use spring-dm instead...
> >
> > Thanks for any help!
> >
> > Ryan
>
>
>


Request Reply

2013-03-04 Thread Alban Joly
Hello,

I am trying to make a route which insert a message in an activeMq from an
httprequest in some case. In other case, Camel is just an HTTP Bridge

My route :


${bodyAs(String)} contains 'async=true'







My problem is when activemq component is called, the response is an HTTP
Response with a 200 status code and the body of my original request
I would like to rewrite the body of this request to write a message like
"everything is fine" but I don't know How to do ... 
Moreover i would Like to write the body response in the format expected
(JSON, XML, TEXT,...)

Anyone can help me please ?

Thank you!




--
View this message in context: 
http://camel.465427.n5.nabble.com/Request-Reply-tp5728478.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ActiveMQ - Request Reply

2013-03-04 Thread Alban Joly
In the case of the message will be posted in the queue, HTTP response can be
sent just after the post of the message. It is for asynchronous work. I
would like to get a HTTP response quickly

Thank you





--
View this message in context: 
http://camel.465427.n5.nabble.com/ActiveMQ-Request-Reply-tp5728478p5728485.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Enable wire logs on Camel HTTP Proxy

2013-03-04 Thread Willem jiang
If you are using Jetty, I think you can find out the HTTP log somewhere.
And Scott just show you how to log the request and response message in the 
camel route.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem




On Tuesday, March 5, 2013 at 4:49 AM, rouble wrote:

> [Re-viving old thread]
>  
> So this shows the communication between the camel proxy box and the
> remote endpoint.
>  
> How do I see the HTTP logs between the client and the camel proxy box?
>  
> Basically, the network topology is Client<=>Camel
> Proxy<===>Remote Endpoint
>  
> tia,
> rouble
>  
> > The following should allow you to see both:
> >  
> >  
> > from("servlet:///proxyWebService/api/?matchOnUriPrefix=true")
> > .log("Request message: ${body}")
> >  
> > .to("https4://realWebService:8443/api/?bridgeEndpoint=true&throwExceptionOnFailure=false")
> > .log("Response message: ${body}");
> >  
> > Hope this helps.
> >  
> > Best Regards,
> > Scott ES
> >  
> > On Wed, Dec 5, 2012 at 4:38 PM, rouble  > (mailto:r.ou...@gmail.com)> wrote:
> >  
> > > I have a camel route setup to proxy a web service as follows:
> > >  
> > > from("servlet:///proxyWebService/api/?matchOnUriPrefix=true")
> > >  
> > > .to("https4://realWebService:8443/api/?bridgeEndpoint=true&throwExceptionOnFailure=false");
> > >  
> > > How can I see the inbound and outbound HTTP Requests and Responses? I
> > > don't need any other camel logs for my purpose just the wire logs.
> > >  
> > > tia,
> > > rouble
> >  
> >  
> >  
> >  
> >  
> > --
> > --
> > Scott England-Sullivan
> > Apache Camel Committer
> > Principal Consultant / Sr. Architect | Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Web: fusesource.com  |
> > redhat.com
> > Blog: sully6768.blogspot.com (http://sully6768.blogspot.com)
> > Twitter: sully6768
>  





Re: Camel XQuery - Saxon

2013-03-04 Thread Willem jiang
Hi,

What's stack trace look like?
Can you submit a simple test case for it?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 5, 2013 at 5:26 AM, Phobos wrote:

>  
> Hi,
>  
> Saxon allows for java methods to invoke from XQuery, for example;
>  
> declare namespace math=java:java.lang.Math;
>  
> let $r := math:random()
>  
> return $r
>  
> It would appear that this doesn't work out of the box in the Camel
> implementation. Does anyone know how to enable this?
>  
> Thanks
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-XQuery-Saxon-tp5728490.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Re: Dependencies for Camel Core 2.10

2013-03-04 Thread Christian Müller
The issues@ mailing list is where all our JIRA notifications are posted to.
You cannot send messages to this list. And the users@ list is the right one.

Camel camel-core 2.11-SNAPSHOT has the following dependencies (the same for
2.10.x):
[INFO] org.apache.camel:camel-core:bundle:2.11-SNAPSHOT
[INFO] +-
com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.3.2:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] +- org.osgi:org.osgi.core:jar:4.3.1:provided
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.2:test
[INFO] |  \- log4j:log4j:jar:1.2.17:test (version managed from 1.2.17)
[INFO] +- org.easymock:easymock:jar:3.1:test
[INFO] |  +- cglib:cglib-nodep:jar:2.2.2:test
[INFO] |  \- org.objenesis:objenesis:jar:1.2:test
[INFO] +- xml-resolver:xml-resolver:jar:1.2:test
[INFO] \- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile

As you can see, there is only a runtime dependency to slf4j. The dependency
to concurrentlinkedhashmap-lru is "inlined" (we renamed the package and
inlined all needed classes). If you run in an OSGI environment, the
dependency to org.osgi.core is provided by the container (version 4.2.0 -
not 5.0.0).
May you use another Camel component (not in camel-core) which introduce
this dependency to Xerces?

Best,
Christian

On Sun, Mar 3, 2013 at 6:22 PM, Igor Stepanov  wrote:

> Failed to send the mail to "iss...@camel.apache.org", so trying this one.
>
> -- Forwarded message --
> From: Igor Stepanov 
> Date: 2013/3/3
> Subject: Dependencies for Camel Core 2.10
> To: iss...@camel.apache.org
>
>
> Hi Apache Camel Community,
>
> I'm a new user of this cool integration framework. While starting to
> use it, I've found several problems and had not a very good time
> solving them, so now I'd like to share some of that solutions with
> you.
>
> First of all I've used this page for the list of dependencies:
> http://camel.apache.org/what-are-the-dependencies.html
> In my opinion it requires to be updated a bit.
>
> I've found out that for my case it wasn't complete. I use Weblogic 10
> with Java 6 and Red Hat Linux.
> Error:
> "NoClassDefFoundError: org/osgi/framework/BundleActivator"
> Root cause:
> Class "org.apache.camel.impl.osgi.Activator" has a dependency for OSGI
> interfaces, so a jar with them was required for Camel deployment. I've
> added "osgi.core.jar" to the list of my server's libraries.
> 
> org.osgi
> org.osgi.core
> 5.0.0
> runtime
> 
>
> Error:
> Logging is not working for Apache Camel - the appropriate log files
> are created, but stay empty.
> Root cause:
> Both jdk and log4j binding libraries of slf4j are deployed on the
> server. In my case I've updated "slf4j-api.jar" and
> "slf4j-log4j12.jar" to the versions required by Camel and removed
> "slf4j-jdk14.jar" from the server.
> 
> org.slf4j
> slf4j-api
> 1.6.1
> compile
> 
> 
> org.slf4j
> slf4j-log4j12
> 1.6.1
> runtime
> 
>
> Error:
> java.lang.IllegalArgumentException: Source parameter
> of type 'org.apache.camel.StringSource' is not compatible with result
> parameter of type 'javax.xml.transform.stream.StreamResult'.
> at
> org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown
> Source)
> at
> org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown
> Source)
> at
>
> org.apache.camel.processor.validation.ValidatingProcessor.process(ValidatingProcessor.java:127)
> at
>
> org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:101)
> at
>
> org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)
> Root cause:
> I had Apache Xerces version 2.9.1 and tried to use Camel 2.10.3/2.10.4
> - error occures any time I try to use XSD validation. Than I tried
> Camel 2.9.2 - everything was great.
> To fix the same on 2.10.3/2.10.4 you require to update Xerces to
> 2.11.0, at least it works for me:
>   
> apache
> xerces
> 2.11.0
> runtime
> pom
>   
>
> P.S.: I've decided to move from 2.9.2 to 2.10.4 because unit tests
> fail to launch on 2.9.2 for some reason. This investigation is still
> in progress.
>
> --
> BR,
> Igor Stepanov
>
>
> --
> BR,
> Igor Stepanov
>



--


Headers are disapearing in RoutePolicy.onExchangeDone

2013-03-04 Thread garrydias
Hi, Friends

#1) consider the route below:

/   


   

/

when my app runs that route, my RoutePolicy bean perform onExchangeBegin and
onExchangeDone methods which prints /"onExchangeBegin - Total headers: 30"/
and /"onExchangeDone - Total headers: 30"/, respectively.


#2) Changing my route like that:

/   


*
amq_destination_1
*
/

when my app runs that route, my RoutePolicy bean perform onExchangeBegin and
onExchangeDone methods which prints /"onExchangeBegin - Total headers: 30"/
and /*"onExchangeDone - Total headers: 0"*/, respectively.


What the route #2 did to my message headers in the onExchangeDone execution?


/Method bodies:/
public void onExchangeBegin(Route route, Exchange exchange)
{
System.out.println("onExchangeBegin - Total headers: " +
exchange.getIn().getHeaders().size());
}


public void onExchangeDone(Route route, Exchange exchange)
{
System.out.println("onExchangeDone - Total headers: " +
exchange.getIn().getHeaders().size());
}



--
View this message in context: 
http://camel.465427.n5.nabble.com/Headers-are-disapearing-in-RoutePolicy-onExchangeDone-tp5728492.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Opposite of split

2013-03-04 Thread Hadrian Zbarcea
Yes, that's slow. Would it be possible to do a bit of profiling and 
provide some metrics to identify where the bottleneck is?

Hadrian

On 03/04/2013 03:59 PM, Jean Francois LE BESCONT wrote:

I have try to us BodyInAggregatingStrategy in [] :

.aggregate(header("CamelFileName"), new
BodyInAggregatingStrategy()).completionTimeout(3000)

But it is also slow ... 12 000 lines in 20 seconds, not possible for a
mediation system...


2013/3/4 jeff 


Thks Claus for the answer, but I have not found the simplest way to do a
simple:

 from("file://input")
 .split()
 .tokenize("\n")
 .unmarshal
 .bindy(BindyType.Csv, AED.class)
 .bean(AEDProcessor.class, "processTicket")
 .marshal()
 .bindy(BindyType.Csv, AEDResult.class)
 [?]
 .to("file://output?fileName=${file:name}")

The only way I found is to do a :

.to("file://output?fileName=${file:name}&fileExist=Append")

But it is too slow !





--
View this message in context:
http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
Sent from the Camel - Users mailing list archive at Nabble.com.





Camel XQuery - Saxon

2013-03-04 Thread Phobos

Hi,

Saxon allows for java methods to invoke from XQuery, for example;

declare namespace math=java:java.lang.Math;

let $r := math:random()

return $r

It would appear that this doesn't work out of the box in the Camel
implementation. Does anyone know how to enable this?

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-XQuery-Saxon-tp5728490.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Enable wire logs on Camel HTTP Proxy

2013-03-04 Thread rouble
[Re-viving old thread]

So this shows the communication between the camel proxy box and the
remote endpoint.

How do I see the HTTP logs between the client and the camel proxy box?

Basically, the network topology is Client<=>Camel
Proxy<===>Remote Endpoint

tia,
rouble

> The following should allow you to see both:
>
>
> from("servlet:///proxyWebService/api/?matchOnUriPrefix=true")
>  .log("Request message: ${body}")
>
>  
> .to("https4://realWebService:8443/api/?bridgeEndpoint=true&throwExceptionOnFailure=false")
>  .log("Response message: ${body}");
>
> Hope this helps.
>
> Best Regards,
> Scott ES
>
> On Wed, Dec 5, 2012 at 4:38 PM, rouble  wrote:
>
>> I have a camel route setup to proxy a web service as follows:
>>
>> from("servlet:///proxyWebService/api/?matchOnUriPrefix=true")
>>
>> .to("https4://realWebService:8443/api/?bridgeEndpoint=true&throwExceptionOnFailure=false");
>>
>> How can I see the inbound and outbound HTTP Requests and Responses? I
>> don't need any other camel logs for my purpose just the wire logs.
>>
>> tia,
>> rouble
>>
>
>
>
> --
> --
> Scott England-Sullivan
> Apache Camel Committer
> Principal Consultant / Sr. Architect | Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: fusesource.com  |
> redhat.com
> Blog: sully6768.blogspot.com
> Twitter: sully6768


Re: How to schedule FTP with quartz?

2013-03-04 Thread Chris Wolf
Ok, that's what I was looking for - specifically the Cron version:

http://camel.apache.org/cronscheduledroutepolicy.html

Thanks for the help,

Chris

On Sat, Mar 2, 2013 at 1:43 AM, Claus Ibsen  wrote:
> Hi
>
> See about route policy
> http://camel.apache.org/routepolicy
>
> And the scheduled route policy
> http://camel.apache.org/scheduledroutepolicy.html
>
> On Sat, Mar 2, 2013 at 12:15 AM, Chris Wolf  wrote:
>> I have a requirement to download files via FTP during a certain time
>> window and according to a schedule. e.g. Only on trading days between
>> 6:30AM and 7:00AM.  The FTP component, alone, seems to just do
>> indefinite polling according to delay/initialDelay.
>>
>> From the "Camel In Action" book, chapter 7, I see some examples of
>> sending a text message with the Timer and Quartz components, but I
>> can't quite see how to put that together to implement "kicking off
>> routes at specified intervals", mentioned in the best practices list
>> at the end of that chapter.  How would I use quartz to stop/start the
>> FTP component, or the route that it's in?
>>
>> Thanks,
>>
>> Chris
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen


Quartz component question

2013-03-04 Thread Larry Meadors
I have a weekly data export that uses a quart timer defined like this:

quartz://circVendorRoyaltyTimer?cron=0+0+1+?+*+SAT+*

The timer sends a message to a route that in turn sends a message with
a date range in it to another route that queries the data based on
that date range and then puts the results in a queue.

This was done so that the default behavior would be a timed export,
but we can manually export different date ranges and suspend the timer
route for testing while leaving the manual export enabled.

Early last Friday, I deployed a new version of this and then used JMX
to suspend the timer.

I then sent the message to trigger a manual export at 1:13am on Saturday.

The export processing is done by a system on the other side of the
country, so it wasn't until this morning that I found out that there
were two exports done:
 - one at 1:00am
 - one at 1:13am

I double checked the timer this morning, it's stopped.

I think my question is: Does the quartz component schedule the job
proactively when it starts, or is it somehow waiting for the time to
arrive, then running it at that time?

Based on the outcome of my export, I'm guessing the former. If that's
true, is there a way to cancel that scheduled job?

Larry


Re: Update database using Java DSL JPA

2013-03-04 Thread golivamsi84
thanks, it worked.

But this is my other question, is it ok to write that logic in the Entity
bean class? or should this logic be part of the class where the route is
defined. Asking, so that I am following best practices.

Since I am already here, I will ask the next question: Say I have table A
and table B

Now I need to update one of the column in table B with a value that I get
from table A. To be exact, so based on some criteria I need to pull a column
value in table A, then take that column value and update a column in table B
with the value I pulled from table A.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Update-database-using-Java-DSL-JPA-tp5728463p5728482.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Opposite of split

2013-03-04 Thread jeff
Thks Claus for the answer, but I have not found the simplest way to do a
simple:  

from("file://input")
.split()
.tokenize("\n")
.unmarshal
.bindy(BindyType.Csv, AED.class)
.bean(AEDProcessor.class, "processTicket")
.marshal()
.bindy(BindyType.Csv, AEDResult.class)
[?]
.to("file://output?fileName=${file:name}")

The only way I found is to do a :
   
.to("file://output?fileName=${file:name}&fileExist=Append")

But it is too slow ! 





--
View this message in context: 
http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Login/session token with Camel/CXF

2013-03-04 Thread kingolego
sothach wrote
> I need to integrate with a third party system via its WS interface.  To
> send a request, I must first "login" to the server, and obtain an
> authentication token to attach to all subsequent requests.  This token has
> a limited shelf-life, and will time-out after a period of time, requiring
> me to re-apply.
> My question: is there a standard pattern in Camel for this scenario? 
> My first thought is to implement this by having an enrichment stage, that
> calls out to "direct:login" route, setting a header with the token, that
> can then be used when marshaling the call.  
> Is there a simpler way?

I am new to camel, but am facing the same problem and have chosen to use the
enrichment pattern, mostly because I need to implement other, more
"classical" enrichment scenarios. Interceptors are an alternative approach,
but I think are not simpler, especially given the timeout and refresh
requirements.

Two "bits" of information that may be helpful to you. 

The Enrich(er) resource is expected to implement the Producer interface.
This may be obvious to an experienced Cameler, but I didn't see it
documented and only discovered reading  the Enricher source.

  
The Enricher only exercises the process method of the Processor
super-interface, however, not Service start and stop, at least in my
configuration. I use a ProducerTemplate instance within the Producer
implementation that is configured with the same endpoint as the regular
messages.

This will not apply to you unless you use CXF messages in Pojo data format
and "out-of-band" SOAP headers to send the authentication token, but the
example code in 
http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPOJOmode
  
is broken. If there are no existing headers, the example
InsertResponseOutHeaderProcessor.process will throw a NullPointerException,
mistakenly trying to use the QName from an existing header to create the new
one.

I've been meaning to post an issue about this, but there it is

Otherwise, the Enrich is working well for me inside a basic proxy based on
the camel examples, with routing based on the SOAP action/operation.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Login-session-token-with-Camel-CXF-tp5728467p5728477.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Prolems with parametrized bean method call via simple

2013-03-04 Thread garrydias
Hi, Claus

I was using 2.9.2. The same problem happens even after updating to 2.10.3:

/java.text.ParseException: Unexpected end of expression/.

Thanx

[]s



--
View this message in context: 
http://camel.465427.n5.nabble.com/Prolems-with-parametrized-bean-method-call-via-simple-tp5728319p5728476.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Login/session token with Camel/CXF

2013-03-04 Thread sothach
I need to integrate with a third party system via its WS interface.  To send
a request, I must first "login" to the server, and obtain an authentication
token to attach to all subsequent requests.  This token has a limited
shelf-life, and will time-out after a period of time, requiring me to
re-apply.
My question: is there a standard pattern in Camel for this scenario? 
My first thought is to implement this by having an enrichment stage, that
calls out to "direct:login" route, setting a header with the token, that can
then be used when marshaling the call.  
Is there a simpler way?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Login-session-token-with-Camel-CXF-tp5728467.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Update database using Java DSL JPA

2013-03-04 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 4:31 PM, golivamsi84  wrote:
> Hello,
>
> I am pretty new in using camel and we are just trying to incorporate it in
> our architecture, so everyone here is pretty new to Camel. So please forgive
> me if this so basic question.
>

Welcome to the community.


> Question:
> I am trying to access and update oracle database using JPA Hibernate. So I
> created my route for now which reads data from the database, I believe it
> just runs a select query and I can see the results.
>
> from("oracleJpa://com.nationwide.financialresponsibility.model.Driver?consumeDelete=false&maximumResults=3&consumer.delay=5000")
> .to("stream:out");
>
> So can someone help me how I can update records in the database.Please
> explain me in detail if you can so that I can understand the flow. We are
> struggling on this one for a while now.
>

It depends what you want to update.

The JPA component in the  is designed to be a data transfer with
a table having the data.
So the idea is that Camel polls the table for new row(s). And after
they have been processed.
The row(s) can either be DELETED or UPDATED. And for updated you would
for example need
to set some column as a "flag" to indicate they have been processed.
So on the next poll these row(s)
is not picked up again.

There is a @Consumed  annotation you should add to a method on your
Entity bean. Then Camel calls that to update the entity. Then you can
use java code to set the "flag".

There is a little example from unti test here
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java

> thanks
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Update-database-using-Java-DSL-JPA-tp5728463.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel contexts not removed when WAR deployed on JBoss AS 7

2013-03-04 Thread Lars-Erik Helander
Just confirming that stopping the contexts in my bean destructors (@PreDestroy) 
fixed the problem ;)

Thanks
Lars

Skickat från min iPhone

4 mar 2013 kl. 15:37 skrev helander :

> I did suspect that, especially sine the contexts disappeared from jconsole
> once i stopped them (using jconsole). I will add proper desctruction code on
> my beans and hopefully the problem will go away.
> 
> Thanks
> 
> Lars
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-contexts-not-removed-when-WAR-deployed-on-JBoss-AS-7-tp5728435p5728461.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Update database using Java DSL JPA

2013-03-04 Thread golivamsi84
Hello,

I am pretty new in using camel and we are just trying to incorporate it in
our architecture, so everyone here is pretty new to Camel. So please forgive
me if this so basic question.

Question:
I am trying to access and update oracle database using JPA Hibernate. So I
created my route for now which reads data from the database, I believe it
just runs a select query and I can see the results.

from("oracleJpa://com.nationwide.financialresponsibility.model.Driver?consumeDelete=false&maximumResults=3&consumer.delay=5000")
.to("stream:out");

So can someone help me how I can update records in the database.Please
explain me in detail if you can so that I can understand the flow. We are
struggling on this one for a while now.

thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Update-database-using-Java-DSL-JPA-tp5728463.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel contexts not removed when WAR deployed on JBoss AS 7

2013-03-04 Thread helander
I did suspect that, especially sine the contexts disappeared from jconsole
once i stopped them (using jconsole). I will add proper desctruction code on
my beans and hopefully the problem will go away.

Thanks

Lars



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-contexts-not-removed-when-WAR-deployed-on-JBoss-AS-7-tp5728435p5728461.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: zip file best practices

2013-03-04 Thread Gardella juan
Hi,

It is a new feature so I don't touch any existent class of camel. So, in
what module I have to do a patch?

Juan


2013/3/4 Claus Ibsen-2 [via Camel] 

> Hi
>
> Thanks for your contribution.
>
> Though its easier if its a patch. So I suggest to read here about how
> to create and submit patches to Apache Camel
> http://camel.apache.org/contributing.html
>
>
> On Mon, Mar 4, 2013 at 3:05 PM, Gardella juan
> <[hidden email] >
> wrote:
>
> > The source code has a bug. I fixed it and I want to contribute because
> the
> > solution is based in alexey-s solution. I 've attached the source code.
> >
> > camel-zipsplitter.zip
> > 
> >
> > Thanks,
> > Juan
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/zip-file-best-practices-tp5713437p5728454.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/zip-file-best-practices-tp5713437p5728457.html
>  To unsubscribe from zip file best practices, click 
> here
> .
> NAML
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/zip-file-best-practices-tp5713437p5728459.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to pass decrypted value in from tag

2013-03-04 Thread Christian Müller
I'm in vacation and do not have access to our code. Will be back in one
week...

Sent from a mobile device
Am 04.03.2013 00:56 schrieb "sarfaraj" :

> How do I used/access Java code in "from" tag. Any example please.
> I am not able to proceed further
>
> /Sarfaraj
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-pass-decrypted-value-in-from-tag-tp5728363p5728408.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: zip file best practices

2013-03-04 Thread Claus Ibsen
Hi

Thanks for your contribution.

Though its easier if its a patch. So I suggest to read here about how
to create and submit patches to Apache Camel
http://camel.apache.org/contributing.html


On Mon, Mar 4, 2013 at 3:05 PM, Gardella juan
 wrote:
> The source code has a bug. I fixed it and I want to contribute because the
> solution is based in alexey-s solution. I 've attached the source code.
>
> camel-zipsplitter.zip
> 
>
> Thanks,
> Juan
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/zip-file-best-practices-tp5713437p5728454.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: jackson2

2013-03-04 Thread Claus Ibsen
Hi David

Can you attach either a patch file on the JIRA so its easy to patch
with the general patch command.
Or do a github pull request or something.



On Mon, Mar 4, 2013 at 11:15 AM, David Karlsen  wrote:
> https://github.com/davidkarlsen/camel/tree/jackson2
> https://github.com/davidkarlsen/camel/commit/f7d8576409bd3dfa511e029508f65ca1c007d2db
>
>
> 2013/3/4 David Karlsen :
>> On it - will come up with a github branch shortly.
>>
>> 2013/2/22 Willem jiang :
>>> Current I don't think camel support it out of box. But any contributions 
>>> are welcomed :)
>>>
>>>
>>> --
>>> Willem Jiang
>>>
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Web: http://www.fusesource.com | http://www.redhat.com
>>> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
>>> (English)
>>>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
>>> Twitter: willemjiang
>>> Weibo: 姜宁willem
>>>
>>>
>>>
>>>
>>>
>>> On Friday, February 22, 2013 at 1:04 PM, mmoores wrote:
>>>
 I see camel module POMs with jackson2 but i don't see any any public 
 support
 for the newer com.fasterxml based marshalling. Anyone working on this?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/jackson2-tp5727987.html
 Sent from the Camel - Users mailing list archive at Nabble.com 
 (http://Nabble.com).
>>>
>>>
>>>
>>
>>
>>
>> --
>> --
>> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>
>
>
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel contexts not removed when WAR deployed on JBoss AS 7

2013-03-04 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 12:48 PM, helander  wrote:
> JBoss AS 7 (version 7.1.1 Final)
>
> I do not use any Spring.
>
> Context#1:
>Singleton EJB. The bean class extends DefaultCamelContext
>
> Context#2:
>SessionScoped CDI bean. The bean class extends DefaultCamelContext
>
>
> All deployed by a single WAR.
>

You would need to make sure that the CamelContext is stopped when your
applications is stopped.
eg call the .stop() method on your CamelContext instance.



>
> Thanks
>
> Lars
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-contexts-not-removed-when-WAR-deployed-on-JBoss-AS-7-tp5728435p5728444.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel contexts not removed when WAR deployed on JBoss AS 7

2013-03-04 Thread helander
JBoss AS 7 (version 7.1.1 Final)

I do not use any Spring.

Context#1:
   Singleton EJB. The bean class extends DefaultCamelContext

Context#2:
   SessionScoped CDI bean. The bean class extends DefaultCamelContext


All deployed by a single WAR.


Thanks

Lars 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-contexts-not-removed-when-WAR-deployed-on-JBoss-AS-7-tp5728435p5728444.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: jackson2

2013-03-04 Thread David Karlsen
There is a change in packagenames and GAV for jackson2 vs jackson1 -
else it's pretty much the same in the cases I've been using it.

2013/3/4 Claus Ibsen :
> On Mon, Mar 4, 2013 at 10:51 AM, David Karlsen  wrote:
>> On it - will come up with a github branch shortly.
>>
>
> Yeah we can migrate to jackson2 in Camel 2.12 / 3.0.
>
> Or maybe even in Camel 2.11 if there is good reasons for doing so.
> And if there is very little migration issues for end users. Or can end
> users easily go from jackson 1.9 to 2.0 ?
>
>
>> 2013/2/22 Willem jiang :
>>> Current I don't think camel support it out of box. But any contributions 
>>> are welcomed :)
>>>
>>>
>>> --
>>> Willem Jiang
>>>
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Web: http://www.fusesource.com | http://www.redhat.com
>>> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
>>> (English)
>>>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
>>> Twitter: willemjiang
>>> Weibo: 姜宁willem
>>>
>>>
>>>
>>>
>>>
>>> On Friday, February 22, 2013 at 1:04 PM, mmoores wrote:
>>>
 I see camel module POMs with jackson2 but i don't see any any public 
 support
 for the newer com.fasterxml based marshalling. Anyone working on this?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/jackson2-tp5727987.html
 Sent from the Camel - Users mailing list archive at Nabble.com 
 (http://Nabble.com).
>>>
>>>
>>>
>>
>>
>>
>> --
>> --
>> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen


Re: jackson2

2013-03-04 Thread David Karlsen
https://github.com/davidkarlsen/camel/tree/jackson2
https://github.com/davidkarlsen/camel/commit/f7d8576409bd3dfa511e029508f65ca1c007d2db


2013/3/4 David Karlsen :
> On it - will come up with a github branch shortly.
>
> 2013/2/22 Willem jiang :
>> Current I don't think camel support it out of box. But any contributions are 
>> welcomed :)
>>
>>
>> --
>> Willem Jiang
>>
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://www.fusesource.com | http://www.redhat.com
>> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
>> (English)
>>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>>
>>
>>
>>
>> On Friday, February 22, 2013 at 1:04 PM, mmoores wrote:
>>
>>> I see camel module POMs with jackson2 but i don't see any any public support
>>> for the newer com.fasterxml based marshalling. Anyone working on this?
>>>
>>>
>>>
>>> --
>>> View this message in context: 
>>> http://camel.465427.n5.nabble.com/jackson2-tp5727987.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com 
>>> (http://Nabble.com).
>>
>>
>>
>
>
>
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen


Re: jackson2

2013-03-04 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 10:51 AM, David Karlsen  wrote:
> On it - will come up with a github branch shortly.
>

Yeah we can migrate to jackson2 in Camel 2.12 / 3.0.

Or maybe even in Camel 2.11 if there is good reasons for doing so.
And if there is very little migration issues for end users. Or can end
users easily go from jackson 1.9 to 2.0 ?


> 2013/2/22 Willem jiang :
>> Current I don't think camel support it out of box. But any contributions are 
>> welcomed :)
>>
>>
>> --
>> Willem Jiang
>>
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://www.fusesource.com | http://www.redhat.com
>> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
>> (English)
>>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>>
>>
>>
>>
>> On Friday, February 22, 2013 at 1:04 PM, mmoores wrote:
>>
>>> I see camel module POMs with jackson2 but i don't see any any public support
>>> for the newer com.fasterxml based marshalling. Anyone working on this?
>>>
>>>
>>>
>>> --
>>> View this message in context: 
>>> http://camel.465427.n5.nabble.com/jackson2-tp5727987.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com 
>>> (http://Nabble.com).
>>
>>
>>
>
>
>
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: jackson2

2013-03-04 Thread David Karlsen
On it - will come up with a github branch shortly.

2013/2/22 Willem jiang :
> Current I don't think camel support it out of box. But any contributions are 
> welcomed :)
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
> (English)
>   http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Friday, February 22, 2013 at 1:04 PM, mmoores wrote:
>
>> I see camel module POMs with jackson2 but i don't see any any public support
>> for the newer com.fasterxml based marshalling. Anyone working on this?
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/jackson2-tp5727987.html
>> Sent from the Camel - Users mailing list archive at Nabble.com 
>> (http://Nabble.com).
>
>
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen


Re: Camel contexts not removed when WAR deployed on JBoss AS 7

2013-03-04 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 10:34 AM, helander  wrote:
> I have a web application that creates a couple of camel contexts. I was
> surprised to see that when I redeployed my application, the camel contexts
> created by the "old" application instance was still visible via jconsole
> after having redeployed the application (along with the set of contexts
> created by the "new" application instance. I was even more surprised when I
> found that after having undeployed the application (no instance available on
> the server) the camel contexts are still visible via jconsole.
>
> Is this behaviour to be expected, or ?
>

Yes as Camel is so self-aware that it has a built-in defense mehanism
to stay alive ;)

Well of course this is not desired.

What version of JBoss AS do you use?
And how do you deploy Camel? as a WAR or some other way?

And if you use WAR do you use a spring xml file or something as we show here
http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html



> Thanks
>
> Lars
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-contexts-not-removed-when-WAR-deployed-on-JBoss-AS-7-tp5728435.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Camel contexts not removed when WAR deployed on JBoss AS 7

2013-03-04 Thread helander
I have a web application that creates a couple of camel contexts. I was
surprised to see that when I redeployed my application, the camel contexts
created by the "old" application instance was still visible via jconsole
after having redeployed the application (along with the set of contexts
created by the "new" application instance. I was even more surprised when I
found that after having undeployed the application (no instance available on
the server) the camel contexts are still visible via jconsole.

Is this behaviour to be expected, or ?

Thanks

Lars



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-contexts-not-removed-when-WAR-deployed-on-JBoss-AS-7-tp5728435.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Spam]: Re: Is there batch functionality in Camel?

2013-03-04 Thread Walzer, Thomas
Another approach:

http://blog.nanthrax.net/2011/08/use-camel-cxf-and-karaf-to-implement-batches/

Am 28.02.2013 um 17:18 schrieb "Vasilev, Ivan" :

> Thanks Henryk and Maruan!
> 
> It really helped.
> 
> Best Regards,
> Ivan
> 
> -Original Message-
> From: Henryk Konsek [mailto:hekon...@gmail.com] 
> Sent: Wednesday, February 27, 2013 10:27 PM
> To: users@camel.apache.org
> Subject: [Spam]: Re: Is there batch functionality in Camel?
> 
> Hi Ivan,
> 
>> I wonder if the Spring Batch Component (
>> http://camel.apache.org/springbatch.html) is proper to use in this case?
> 
> You can use CamelItemReader to pass messages into Spring Batch.
> However I would say that your case is too simple to use Spring Batch for this 
> purpose.
> 
> I would advise to use aggregator instead.
> 
> from("seda:queue").
>  aggregate().groupExchanges().
>  completionSize(1000).completionTimeout(1).
>  to("seda:aggregatedResults");
> 
> Best regards.
> 
> --
> Henryk Konsek
> http://henryk-konsek.blogspot.com