Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread Christian Müller
Or in Java DSL:

setHeader("CamelFileName", "someNewFileName.txt");

Best,
Christian

On Wed, May 9, 2012 at 11:53 PM, ychawla wrote:

> Hi,
> Did you try setting the camel file name header:
>
>
> 
>  someNewFileName.txt
> 
>
> Thanks,
> Yogesh
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5698676.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Separate XML tags with splitter

2012-05-10 Thread Salomon
Hi!

I'm a beginner in apache camel and I would develop a route which separate
XML tags in differents xml files with the split().

For example :


  

  
  

  
...
  

  


One  tags in one xml file.

Does it possible to do that with camel and how? I didn't find solutions for
the moment.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Separate-XML-tags-with-splitter-tp5699358.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Separate XML tags with splitter

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 9:28 AM, Salomon  wrote:
> Hi!
>
> I'm a beginner in apache camel and I would develop a route which separate
> XML tags in differents xml files with the split().
>
> For example :
>
> 
>  
>
>  
>  
>
>  
> ...
>  
>
>  
> 
>
> One  tags in one xml file.
>
> Does it possible to do that with camel and how? I didn't find solutions for
> the moment.
>

Yes split the xml using xpath.
And then set a file name using a header with the key CamelFileName
And use the file endpoint to write the file

from X
split xpath
  setHeader CamelFileName someNameHere.xml
  to file directory


> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Separate-XML-tags-with-splitter-tp5699358.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: Help with a Karaf/Camel/Cxf/ActiveMQ setup that results in an NPE

2012-05-10 Thread emb
After spending few more hours a decision was made to revisit SMX. Upgrading
camel in SMX-4.4.1 was simple enough. And the application is running.

Thanks,
ed

--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-with-a-Karaf-Camel-Cxf-ActiveMQ-setup-that-results-in-an-NPE-tp5696495p5699454.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Waiting for Routes to Finish

2012-05-10 Thread Alex Anderson
On 9 May 2012 18:05, Claus Ibsen  wrote:
> On Wed, May 9, 2012 at 4:57 PM, rdifrango  wrote:

> There is an in flight registry you can see number of currently in
> flight messages etc.
> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InflightRepository.html

Is it possible to get details of the Exchanges, or just the current number?


Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread qwerty5000
Thanks guys, but the solution you suggested would rename the files after the
ftp step so doesn't work.

Anyway to retain the original file name? This is necessary as I need to
perform some local processing after the file has been ftpd, and I need to
use the file name as some sort of an uid.

--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5699472.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Waiting for Routes to Finish

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 10:06 AM, Alex Anderson  wrote:
> On 9 May 2012 18:05, Claus Ibsen  wrote:
>> On Wed, May 9, 2012 at 4:57 PM, rdifrango  wrote:
>
>> There is an in flight registry you can see number of currently in
>> flight messages etc.
>> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InflightRepository.html
>
> Is it possible to get details of the Exchanges, or just the current number?

Just the numbers by default.
But you can plugin you own in flight repo if you want to keep track of more.

-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: Waiting for Routes to Finish

2012-05-10 Thread Alex Anderson
On 10 May 2012 11:28, Claus Ibsen  wrote:
> On Thu, May 10, 2012 at 10:06 AM, Alex Anderson  wrote:
>> On 9 May 2012 18:05, Claus Ibsen  wrote:
>>> On Wed, May 9, 2012 at 4:57 PM, rdifrango  wrote:
>>
>>> There is an in flight registry you can see number of currently in
>>> flight messages etc.
>>> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InflightRepository.html
>>
>> Is it possible to get details of the Exchanges, or just the current number?
>
> Just the numbers by default.
> But you can plugin you own in flight repo if you want to keep track of more.

Excellent, thank you Claus.  Would the in-flight repository be a
suitable way of tracking current system activity for e.g.
visualisation?


Re: Separate XML tags with splitter

2012-05-10 Thread Salomon
I didn't understand very well your solution.

In your case, I need to know how many tags I have, otherwise it doesn't
work, for example: if I add tags without change the code. 'cause your idea
is to split tags one by one...right? 

It does not exist a solution which separate automatically every tags, in a
node, in differents files? 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Separate-XML-tags-with-splitter-tp5699358p5699571.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ClassCastException using cxf:bean

2012-05-10 Thread cgiera
I think I have found the problem:
The RegistryBean.getBean() method is not thread safe:


When I was debugging this method i notized that the bean member variable
changes every now and then. I think this happens because another thread
changes the member.

In the last if block of the me method I think the following could happen:

The bean member could also be a class, in this case the method tries to get
an instance of this class.
There is one problem in the line value=bean:
What if another thread changes the bean to a class in just this moment?
A class will be returned instead of an object, and so I get my
ClassCastException later when camel tries to execute methods on the class
instead of the object.

Could someone check if the assumptions i made are correct?

 

--
View this message in context: 
http://camel.465427.n5.nabble.com/ClassCastException-using-cxf-bean-tp5599810p5699619.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread Bengt Rodehav
I do this in Camel 2.7.1 and it definitely changes the name of the file
before ftp:ing:

*theExchange.getIn().setHeader(Exchange.FILE_NAME, "newfilename");*

Hope that helps,

/Bengt

2012/5/10 qwerty5000 

> Thanks guys, but the solution you suggested would rename the files after
> the
> ftp step so doesn't work.
>
> Anyway to retain the original file name? This is necessary as I need to
> perform some local processing after the file has been ftpd, and I need to
> use the file name as some sort of an uid.
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5699472.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 11:23 AM, Bengt Rodehav  wrote:
> I do this in Camel 2.7.1 and it definitely changes the name of the file
> before ftp:ing:
>
> *theExchange.getIn().setHeader(Exchange.FILE_NAME, "newfilename");*
>

Yeah you need to store the original file in another header before hand,
and then restore it back again afterwards.

We may wonder some way of making this easier if this is more commonly
used use-case.
Anyone else picking up files, and storing them using a different file
name, and then have to preserve
the original file name afterwards ?

> Hope that helps,
>
> /Bengt
>
> 2012/5/10 qwerty5000 
>
>> Thanks guys, but the solution you suggested would rename the files after
>> the
>> ftp step so doesn't work.
>>
>> Anyway to retain the original file name? This is necessary as I need to
>> perform some local processing after the file has been ftpd, and I need to
>> use the file name as some sort of an uid.
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5699472.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: Separate XML tags with splitter

2012-05-10 Thread Marco Westermann

Hi,

using the split tag creates multiple messages depending on how much 
elements there are, and these messages are processed one by one.


from("file:orders.xml").split().xpath("/orders/order") ...

that means the endpoint after the split is called multiple times (with 
every message)


Now you can write that messages to a file:

...
.to("file://orders/")

which would create files with a generated filename. If you want your own 
filename you need something unique to set it. For example if you have an 
order-id within your order-tag you could use that:


setHeader(Exchange.FILE_NAME).xpath(/order/order_id/text(), String.class)
.to("file://orders/")

I hope that helps,

regards, Marco

Am 10.05.2012 10:51, schrieb Salomon:

I didn't understand very well your solution.

In your case, I need to know how many tags I have, otherwise it doesn't
work, for example: if I add tags without change the code. 'cause your idea
is to split tags one by one...right?

It does not exist a solution which separate automatically every tags, in a
node, in differents files?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Separate-XML-tags-with-splitter-tp5699358p5699571.html
Sent from the Camel - Users mailing list archive at Nabble.com.





Re: Apache Camel : CXFRS Server : Need advice for Routing

2012-05-10 Thread Sergey Beryozkin

Hi
On 10/05/12 07:47, anand_tech wrote:

i am making restful webservices using apache cxf and camel. my configuration
is something like this :

 
 
 
 
 
 
 
I have three service beans exposed as services and are mapped to different
urls and the route is something like this :

 
   
 
 http://google"; />
 

Now for each service bean i want to have different route as all three have
different functionality, but i am unable to determine what should i write in
my

 

tag to distinguish routes according to service beans. Or is there any other
way of doing this?  please suggest something.

Perhaps it would be simpler to create 3 cxfrs endpoints with unique ids, 
one linking to Demo, etc ? Example,



  

  


with the @Path annotation on the Demo root resource now containing "/" 
and rsServer/@address assuming the "/demo" value, etc ?


Sergey



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-CXFRS-Server-Need-advice-for-Routing-tp5699287.html
Sent from the Camel - Users mailing list archive at Nabble.com.




Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread qwerty5000
I can now get it to work using the re-renaming approach.

Thanks all.

--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5699753.html
Sent from the Camel - Users mailing list archive at Nabble.com.


BeanFactory not initialized on second test

2012-05-10 Thread James Talbut
Hi,

I'm getting an error of:
java.lang.IllegalStateException: BeanFactory not initialized or already closed 
- call 'refresh' before accessing beans via the ApplicationContext
when my application context is created for the second time.

The basics of the class are below.
When test1 is being run it works completely, but when test2 starts the line:
Select5ThingyStuffService service = new Select5ThingyStuffService();
throws the exception above.

Is there a solution for this?

Thanks
Jim


public class ThingyProcessorTest extends CamelSpringTestSupport
{
private static final Logger log = LoggerFactory.getLogger( 
ThingyProcessorTest.class );
private static final String TARGET_URL = 
"http://localhost:9000/Select/Thingy/Stuff";;
private static Select5ThingyStuffPortType client;

@Override
protected AbstractApplicationContext createApplicationContext() {
FileSystemXmlApplicationContext localContext = new 
FileSystemXmlApplicationContext( new String[] { 
"target/generated-resources/xml/xslt/Select5ThingyStuff-1.1.0.xml" }, true );
return localContext;
}

@Override
public void doPreSetup() throws Exception {
super.doPreSetup();

Select5ThingyStuffService service = new Select5ThingyStuffService();

service.addPort( Select5ThingyStuffService.Select5ThingyStuffPort, 
SOAPBinding.SOAP11HTTP_BINDING, TARGET_URL );
client = service.getPort( Select5ThingyStuffPortType.class );
BindingProvider binder = ( BindingProvider ) client;
binder.getRequestContext().put( 
BindingProvider.ENDPOINT_ADDRESS_PROPERTY, TARGET_URL );

Client cl = ClientProxy.getClient(client);
HTTPConduit http = (HTTPConduit) cl.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setReceiveTimeout(0);
http.setClient(httpClientPolicy);
}

@Test
public void test1() {
}

@Test
public void test2() {
}
}



Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread Bengt Rodehav
I think it would be a good feature to have. Our integration counterparts
often require that the name of the file we send to them is hardcoded (i e
it should always be the same name) or conform to a naming standard defined
by the receiver. But internally, on the sending side, the original file is
often named completely differently. We then put files that we have
correctly handled in an archive directory and the  ones we could not handle
in a failed directory. In those cases it is important that we locally
archive with the original file name to have full traceability.

In short, yes support for this would be useful.

/Bengt

2012/5/10 Claus Ibsen 

> On Thu, May 10, 2012 at 11:23 AM, Bengt Rodehav  wrote:
> > I do this in Camel 2.7.1 and it definitely changes the name of the file
> > before ftp:ing:
> >
> > *theExchange.getIn().setHeader(Exchange.FILE_NAME, "newfilename");*
> >
>
> Yeah you need to store the original file in another header before hand,
> and then restore it back again afterwards.
>
> We may wonder some way of making this easier if this is more commonly
> used use-case.
> Anyone else picking up files, and storing them using a different file
> name, and then have to preserve
> the original file name afterwards ?
>
> > Hope that helps,
> >
> > /Bengt
> >
> > 2012/5/10 qwerty5000 
> >
> >> Thanks guys, but the solution you suggested would rename the files after
> >> the
> >> ftp step so doesn't work.
> >>
> >> Anyway to retain the original file name? This is necessary as I need to
> >> perform some local processing after the file has been ftpd, and I need
> to
> >> use the file name as some sort of an uid.
> >>
> >> --
> >> View this message in context:
> >>
> http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5699472.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
>
>
>
> --
> Claus Ibsen
> -
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> 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/
>


Re: Aries TransactionManager + OpenJPA + ActiveMQ

2012-05-10 Thread Charles Moulliard
Hi Arnaud,

As mentioned by Christian Jencks should not be used.  The transacted
parameter should be defined as "false". This parameter tells to Spring that
it does not have to create a local JMSTransaction using Spring JMS
TransactionManager but instead has to be use the JTA TransactionManager. In
your config, it shoulkd use the Apache Geronimo Tx Manager (Aries Tx
Manager) 

Here is another config that we have done for the Fuse Webinar
camel-persistence-part2 of last year 

https://github.com/FuseByExample/camel-persistence-part2/blob/master/route-one-tx-manager/src/main/resources/META-INF/spring/springConfig.xml

Regards,

Charles

--
View this message in context: 
http://camel.465427.n5.nabble.com/Aries-TransactionManager-OpenJPA-ActiveMQ-tp5695175p5699885.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to save a File from Body to disk

2012-05-10 Thread Hilde
Hi folks!

The intention is to save a file from the message body to a directory on the
file system.
Unfortunately I am not able to save a file that sits inside the body to save
to disk via file component. What I am doing wrong?




  ...
  
   ${headers.originialFile}

  
   

At the beginning after the file consumer has detected the file it is saved
to the message header
and in the end the body is equiped with that header in order to save the
file to disk via the file component. It does not work.

Cheers
Hilde



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-save-a-File-from-Body-to-disk-tp5699895.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Waiting for Routes to Finish

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 10:38 AM, Alex Anderson  wrote:
> On 10 May 2012 11:28, Claus Ibsen  wrote:
>> On Thu, May 10, 2012 at 10:06 AM, Alex Anderson  
>> wrote:
>>> On 9 May 2012 18:05, Claus Ibsen  wrote:
 On Wed, May 9, 2012 at 4:57 PM, rdifrango  wrote:
>>>
 There is an in flight registry you can see number of currently in
 flight messages etc.
 http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InflightRepository.html
>>>
>>> Is it possible to get details of the Exchanges, or just the current number?
>>
>> Just the numbers by default.
>> But you can plugin you own in flight repo if you want to keep track of more.
>
> Excellent, thank you Claus.  Would the in-flight repository be a
> suitable way of tracking current system activity for e.g.
> visualisation?

Not really as the in flight repo, is only intended to keep track of
- total number of current inflight messages
- number of inflight that originated for a given route

This is being used by the graceful shutdown, to know when there is no
more messages etc.
And thus its safe to shutdown.

To keep track of what is going on then you have the JMX stats, Event
Notifier, and the Tracer as well.
And there is API on CamelContext to have routes represented in XML,
which mean you can use that for visualization as well.

And there is some people on the user forum talking about a tool that
generates a report of your Camel routes in a visual picture.

Likewise Fuse IDE has capabilities of visualization and whatnot.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


FTP polling seems to stop(?)

2012-05-10 Thread mikaelfj
Hi,

We have a bunch of integrations that polls FTP servers for files.
We have experienced that from time to time the integrations stop fetching
files from the FTP servers.
There are no indications of errors in the log files etc.

It just seem to stop polling the files - if the integration is restarted,
the files not polled previously are taken and operation is back to normal
for a while (that can be several days/weeks).

We are running on Camel 2.6.

Is this an issue that other have experienced  and/or does it relate to a
known problem which have been resolved in later Camel releases?

regards
Mikael

--
View this message in context: 
http://camel.465427.n5.nabble.com/FTP-polling-seems-to-stop-tp5699979.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: FTP polling seems to stop(?)

2012-05-10 Thread Babak Vahdat
Hi

could it be that you're suffering from [1] not being part of Camel version
you're using? If possible try to upgrade and see if that can help.

[1] https://issues.apache.org/jira/browse/CAMEL-4105

Babak

--
View this message in context: 
http://camel.465427.n5.nabble.com/FTP-polling-seems-to-stop-tp5699979p5700066.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to save a File from Body to disk

2012-05-10 Thread Hilde
Please ignore this posting because I caused a typing error!

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-save-a-File-from-Body-to-disk-tp5699895p5700096.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Separate XML tags with splitter

2012-05-10 Thread Salomon
There is a difference between: split().xpath("/orders/order") and
split(xpath("/orders/order")?


I can't run "setHeader(Exchange.FILE_NAME)".

Each of my tags have a id number in attribute...may be that could be a
solution...!?


--
View this message in context: 
http://camel.465427.n5.nabble.com/Separate-XML-tags-with-splitter-tp5699358p5700140.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel : CXFRS Server : Need advice for Routing

2012-05-10 Thread Willem Jiang

Hi,

I'm not sure if these three beans have same method name.
As the REST request will be mapped into a method call, if you check the 
method name in the camelCxfInProcessor, you should be able to tell the 
request is coming for which bean. It should be easy to route the request 
to different endpoint.


Any thought ?

On 5/10/12 2:47 PM, anand_tech wrote:

i am making restful webservices using apache cxf and camel. my configuration
is something like this :

 
 
 
 
 
 
 
I have three service beans exposed as services and are mapped to different
urls and the route is something like this :

 
   
 
 http://google"; />
 

Now for each service bean i want to have different route as all three have
different functionality, but i am unable to determine what should i write in
my

 

tag to distinguish routes according to service beans. Or is there any other
way of doing this?  please suggest something.


--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-CXFRS-Server-Need-advice-for-Routing-tp5699287.html
Sent from the Camel - Users mailing list archive at Nabble.com.
.




--
Willem
--
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 12:59 PM, Bengt Rodehav  wrote:
> I think it would be a good feature to have. Our integration counterparts
> often require that the name of the file we send to them is hardcoded (i e
> it should always be the same name) or conform to a naming standard defined
> by the receiver. But internally, on the sending side, the original file is
> often named completely differently. We then put files that we have
> correctly handled in an archive directory and the  ones we could not handle
> in a failed directory. In those cases it is important that we locally
> archive with the original file name to have full traceability.
>
> In short, yes support for this would be useful.
>

Fell free to create a JIRA ticket.

> /Bengt
>
> 2012/5/10 Claus Ibsen 
>
>> On Thu, May 10, 2012 at 11:23 AM, Bengt Rodehav  wrote:
>> > I do this in Camel 2.7.1 and it definitely changes the name of the file
>> > before ftp:ing:
>> >
>> > *theExchange.getIn().setHeader(Exchange.FILE_NAME, "newfilename");*
>> >
>>
>> Yeah you need to store the original file in another header before hand,
>> and then restore it back again afterwards.
>>
>> We may wonder some way of making this easier if this is more commonly
>> used use-case.
>> Anyone else picking up files, and storing them using a different file
>> name, and then have to preserve
>> the original file name afterwards ?
>>
>> > Hope that helps,
>> >
>> > /Bengt
>> >
>> > 2012/5/10 qwerty5000 
>> >
>> >> Thanks guys, but the solution you suggested would rename the files after
>> >> the
>> >> ftp step so doesn't work.
>> >>
>> >> Anyway to retain the original file name? This is necessary as I need to
>> >> perform some local processing after the file has been ftpd, and I need
>> to
>> >> use the file name as some sort of an uid.
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5699472.html
>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> 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/
>>



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: ClassCastException using cxf:bean

2012-05-10 Thread Willem Jiang
The bean method should be thread safe, as the method will be called 
from different thread.
BTW the bean DSL support to pass the object, can you use the Object 
instead of the Class?


On Thu May 10 17:12:22 2012, cgiera wrote:

I think I have found the problem:
The RegistryBean.getBean() method is not thread safe:


When I was debugging this method i notized that the bean member variable
changes every now and then. I think this happens because another thread
changes the member.

In the last if block of the me method I think the following could happen:

The bean member could also be a class, in this case the method tries to get
an instance of this class.
There is one problem in the line value=bean:
What if another thread changes the bean to a class in just this moment?
A class will be returned instead of an object, and so I get my
ClassCastException later when camel tries to execute methods on the class
instead of the object.

Could someone check if the assumptions i made are correct?



--
View this message in context: 
http://camel.465427.n5.nabble.com/ClassCastException-using-cxf-bean-tp5599810p5699619.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Willem
--
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang



Re: CXF webservice asyn

2012-05-10 Thread Willem Jiang

Hi

Current camel-cxfrs supports the async out of box.
Please check the code of CxfRsInvoker, it leverages the continuation to 
invoke the async processors.


On 5/9/12 4:09 PM, Claus Ibsen wrote:

Hi

Are you using the CXF-RS producer from Camel, eg you do

from file
   to cxfrs

The cxfrs currently doesn't support the async routing engine by nature
http://camel.apache.org/asynchronous-routing-engine.html

And therefore it blocks while waiting for the reply message.
Frankly it ought to be possible, but I think we need to improve the
camel-cxfrs code to support that.
If it did, then no threads is blocking, and the file consumer thread
would be able to pickup the next
file while the previous CXFRS is in progress.

As mention you can use the threads EIP in Camel to force async behavior as well.

On Wed, May 9, 2012 at 6:05 AM, Deepthi  wrote:

Hi Yogesh,

Thanks for ur response.
Yes, I am looking for a thread pool for from point as well. Appreciate your
help

Thanks

--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-webservice-asyn-tp5695918p5696434.html
Sent from the Camel - Users mailing list archive at Nabble.com.







--
Willem
--
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Re: BeanFactory not initialized on second test

2012-05-10 Thread Willem Jiang

Hi

Which version of Camel are you using?
If you want to reuse the ApplicationContext across the test, you can 
add the below codes in you test

public boolean isCreateCamelContextPerClass() {
return true;
}


On Thu May 10 18:53:01 2012, James Talbut wrote:

Hi,

I'm getting an error of:
java.lang.IllegalStateException: BeanFactory not initialized or already closed 
- call 'refresh' before accessing beans via the ApplicationContext
when my application context is created for the second time.

The basics of the class are below.
When test1 is being run it works completely, but when test2 starts the line:
Select5ThingyStuffService service = new Select5ThingyStuffService();
throws the exception above.

Is there a solution for this?

Thanks
Jim


public class ThingyProcessorTest extends CamelSpringTestSupport
{
 private static final Logger log = LoggerFactory.getLogger( 
ThingyProcessorTest.class );
 private static final String TARGET_URL = 
"http://localhost:9000/Select/Thingy/Stuff";;
 private static Select5ThingyStuffPortType client;

 @Override
 protected AbstractApplicationContext createApplicationContext() {
 FileSystemXmlApplicationContext localContext = new 
FileSystemXmlApplicationContext( new String[] { 
"target/generated-resources/xml/xslt/Select5ThingyStuff-1.1.0.xml" }, true );
 return localContext;
 }

 @Override
 public void doPreSetup() throws Exception {
 super.doPreSetup();

 Select5ThingyStuffService service = new Select5ThingyStuffService();

 service.addPort( Select5ThingyStuffService.Select5ThingyStuffPort, 
SOAPBinding.SOAP11HTTP_BINDING, TARGET_URL );
 client = service.getPort( Select5ThingyStuffPortType.class );
 BindingProvider binder = ( BindingProvider ) client;
 binder.getRequestContext().put( 
BindingProvider.ENDPOINT_ADDRESS_PROPERTY, TARGET_URL );

 Client cl = ClientProxy.getClient(client);
 HTTPConduit http = (HTTPConduit) cl.getConduit();
 HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
 httpClientPolicy.setReceiveTimeout(0);
 http.setClient(httpClientPolicy);
 }

 @Test
 public void test1() {
 }

 @Test
 public void test2() {
 }
}






--
Willem
--
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang



Re: BeanFactory not initialized on second test

2012-05-10 Thread James Talbut
Hi,

Using Camel 2.9.2 and CXF 2.6.0.
Previously I was using Camel 2.5.5 (I think) and this was working.

I changed it to use a Spring @RunWith and that made no difference, then I 
noticed that client was static.
When I changed that it started working.

I don't know why it wasn't working as a static, but it's working now.

Thanks.

Jim

On Thu, May 10, 2012 at 10:22:44PM +0800, Willem Jiang wrote:
> Hi
> 
> Which version of Camel are you using?
> If you want to reuse the ApplicationContext across the test, you can 
> add the below codes in you test
> public boolean isCreateCamelContextPerClass() {
>  return true;
> }
> 
> 
> On Thu May 10 18:53:01 2012, James Talbut wrote:
> > Hi,
> >
> > I'm getting an error of:
> > java.lang.IllegalStateException: BeanFactory not initialized or already 
> > closed - call 'refresh' before accessing beans via the ApplicationContext
> > when my application context is created for the second time.
> >
> > The basics of the class are below.
> > When test1 is being run it works completely, but when test2 starts the line:
> > Select5ThingyStuffService service = new Select5ThingyStuffService();
> > throws the exception above.
> >
> > Is there a solution for this?
> >
> > Thanks
> > Jim
> >
> >
> > public class ThingyProcessorTest extends CamelSpringTestSupport
> > {
> >  private static final Logger log = LoggerFactory.getLogger( 
> > ThingyProcessorTest.class );
> >  private static final String TARGET_URL = 
> > "http://localhost:9000/Select/Thingy/Stuff";;
> >  private static Select5ThingyStuffPortType client;
> >
> >  @Override
> >  protected AbstractApplicationContext createApplicationContext() {
> >  FileSystemXmlApplicationContext localContext = new 
> > FileSystemXmlApplicationContext( new String[] { 
> > "target/generated-resources/xml/xslt/Select5ThingyStuff-1.1.0.xml" }, true 
> > );
> >  return localContext;
> >  }
> >
> >  @Override
> >  public void doPreSetup() throws Exception {
> >  super.doPreSetup();
> >
> >  Select5ThingyStuffService service = new 
> > Select5ThingyStuffService();
> >
> >  service.addPort( Select5ThingyStuffService.Select5ThingyStuffPort, 
> > SOAPBinding.SOAP11HTTP_BINDING, TARGET_URL );
> >  client = service.getPort( Select5ThingyStuffPortType.class );
> >  BindingProvider binder = ( BindingProvider ) client;
> >  binder.getRequestContext().put( 
> > BindingProvider.ENDPOINT_ADDRESS_PROPERTY, TARGET_URL );
> >
> >  Client cl = ClientProxy.getClient(client);
> >  HTTPConduit http = (HTTPConduit) cl.getConduit();
> >  HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
> >  httpClientPolicy.setReceiveTimeout(0);
> >  http.setClient(httpClientPolicy);
> >  }
> >
> >  @Test
> >  public void test1() {
> >  }
> >
> >  @Test
> >  public void test2() {
> >  }
> > }
> >
> >
> 
> 
> 
> --
> Willem
> --
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Web: http://www.fusesource.com
> Blog:http://willemjiang.blogspot.com (English)
>  http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
> 


Re: CXF webservice asyn

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 4:11 PM, Willem Jiang  wrote:
> Hi
>
> Current camel-cxfrs supports the async out of box.
> Please check the code of CxfRsInvoker, it leverages the continuation to
> invoke the async processors.
>

Willem, can you update the Camel docs at
http://camel.apache.org/asynchronous-routing-engine.html

To include the producer for cxfrs.
I am not sure which Camel version that happened.

>
> On 5/9/12 4:09 PM, Claus Ibsen wrote:
>>
>> Hi
>>
>> Are you using the CXF-RS producer from Camel, eg you do
>>
>> from file
>>   to cxfrs
>>
>> The cxfrs currently doesn't support the async routing engine by nature
>> http://camel.apache.org/asynchronous-routing-engine.html
>>
>> And therefore it blocks while waiting for the reply message.
>> Frankly it ought to be possible, but I think we need to improve the
>> camel-cxfrs code to support that.
>> If it did, then no threads is blocking, and the file consumer thread
>> would be able to pickup the next
>> file while the previous CXFRS is in progress.
>>
>> As mention you can use the threads EIP in Camel to force async behavior as
>> well.
>>
>> On Wed, May 9, 2012 at 6:05 AM, Deepthi  wrote:
>>>
>>> Hi Yogesh,
>>>
>>> Thanks for ur response.
>>> Yes, I am looking for a thread pool for from point as well. Appreciate
>>> your
>>> help
>>>
>>> Thanks
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/CXF-webservice-asyn-tp5695918p5696434.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>>
>
>
> --
> Willem
> --
>
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: Delay route start

2012-05-10 Thread PhilBurress
Mainly this has to do with startup order of applications in our WAS server
instance (which we unfortunately cannot change). Just need a small delay of
10 to 15 seconds.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Delay-route-start-tp5686442p5700476.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Delay route start

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 4:48 PM, PhilBurress  wrote:
> Mainly this has to do with startup order of applications in our WAS server
> instance (which we unfortunately cannot change). Just need a small delay of
> 10 to 15 seconds.
>

With current code you can mark those routes as auto startup = false,
and attach a route policy
and then in the onInit() method, you schedule a task to run in 10-15
secs, and the task, then starts the route.

We may add something nicer out of the box, if the use-case is more common.

So its maybe just a  to configure in the DSL.

> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Delay-route-start-tp5686442p5700476.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: Graceful shutdown with drain stopping

2012-05-10 Thread Thomas Johansen
I can see that the Jetty consumer is responding with 503 - "Service
unavailable" during the grace-period. I can see from CAMEL-2660 that this
is by intention/design. I was actually hoping that the listening socket was
unbound instead, but as I control the producer code I think I can handle
the 503. My issue is that this is a financial system, so I need to differ
between approved, rejected and unknown status (the latter would require a
reversal/rollback).

Will test the same thing with Mina TCP shortly. In that case we don't
control the clients/producers, so I really hope for a "connection refused"
in the grace-period.

Thanks,
Thomas

2012/5/9 Claus Ibsen 

> On Wed, May 9, 2012 at 8:13 AM, Thomas Johansen  wrote:
> > Hi,
> >
> > I've been looking at the shutdown strategy support, but can't find a way
> to
> > drain stop my routes.
> >
> > I.e. I have an application with several Mina TCP and Jetty consumer
> routes.
> > When shutting down the first thing I want to happen is that these routes
> > stop consuming any more messages which in practice means that their
> > listening sockets are unbound. THEN I want the current inflight exchanges
> > to complete before shutdown.
> >
>
> This should happen currently. The consumer is being shutdown first.
> Then the in flight messages is being processed, and when no more messages
> then the shutdown is complete.
>
> Do you see something else?
> You can enable DEBUG logging at the
> org.apache.camel.impl.DefaultShutdownStrategy
> and see what it logs.
>
>
>
>
> > Is this easily achievable without too much custom code? I guess this
> > problem goes for all routes which are not polling consumers...
> >
> > Takk,
> > Thomas
>
>
>
> --
> Claus Ibsen
> -
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> 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/
>


Load Balancing

2012-05-10 Thread Rocco Gallo Citera
Hello, sorry to bother but I have a problem understanding how load
balancing works with some endpoints.
Basically, I have the following route in a client:
from(timer endpoint)
.loadbalance().roundrobin() (with other types of load balancing the
problem is similar)
.to(http endpoint 1, http endpoint 2)
.end;

from(http endpoint) // both endpoints have the same behavior
.to(file endpoint)

In the server, I have
from(jetty endpoint).
.process(my process)
.to(hazelcast endpoint)

If I don't use the load balance, the example works great, but with it,
any onException are not caught (I can see them on a logging console).
If I use a TCPMon in between the client and the server, I see a
continuous flow with a connection switch every time the starting timer
triggers, but I expected the timer to start the exchange and write now
it just switch connection, so I don't understand why. I tried to find
any documentation about that but none was found. Can anyone please
help me to understand why this behavior happens? I'm using Camel
2.9.2.

Thank you very much.


Re: Separate XML tags with splitter

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 2:54 PM, Salomon  wrote:
> There is a difference between: split().xpath("/orders/order") and
> split(xpath("/orders/order")?
>
>
> I can't run "setHeader(Exchange.FILE_NAME)".
>
> Each of my tags have a id number in attribute...may be that could be a
> solution...!?
>

Yeah its a bit related to this FAQ
http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html

Prefer to use the variant where you pass in the expression as a
parameter. Then the DSL works the best in Java, as the generics type
wont have to change etc. Basically we have stretched how far you can
take a DSL in Java land.


>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Separate-XML-tags-with-splitter-tp5699358p5700140.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
Hi Romain,

>about the javadoc I thought of the dedicated folder: 
>http://maven.apache.org/plugins/maven-javadoc-plugin/examples/javadoc-resources.html.
> 
That wont work if you are already using a doclet like umlgraph. I have
tested locally that indeed I can generate the files with
${basedir}/src/main/javadoc/com/nestorurquiza/orchestration/camel/route
however they will get replaced by those generated by
org.umlgraph.doclet.UmlGraphDoc.

I can certainly put the files in a folder like
/src/main/javadoc/com/nestorurquiza/orchestration/camel/route/doc-files then
use an html referencing all pictures or several html using a picture each
but that will be a lot of handcrafting and the developer will need to add
entries in javadocs manually as new routes are introduced. For now I will
just have a link on WIKI to the doc-files url which lists all images inside.
I believe a feature request to have a doclet that could include the image as
part of the class in javadocs just as UMLGraph does would be beneficial.


>Maybe what i'll say will be obvious fo ryou so sorry if it is the case. 
>Duplicate the  block, change the id (it is unique) and move 
> block in the execution one. This way you can generate 
>mutiple diagrams in the same build.

Thanks for the clarification, it was not clear to me I could do that. 

Even though there is a lot of repetition the below works for now just fine.
I believe the idea of the package should be considered a feature request
just in case anybody has the time in the future to take a look at it:

route1
package

diagram



   
com.nestorurquiza.orchestration.camel.route.SampleCamelRouteBuilder

false

480

640

   
${basedir}/src/main/javadoc/com/nestorurquiza/orchestration/camel/route/doc-files

camel

java

png

true



route2
package

diagram



   
com.nestorurquiza.orchestration.camel.route.SampleCamelRouteBuilder2

false

480

640

   
${basedir}/src/main/javadoc/com/nestorurquiza/orchestration/camel/route/doc-files

camel

java

png

true



Thanks a lot for taking your time to read and for bringing this tool to the
community,
-Nestor


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


Options for achieving this in Camel running inside Tomcat or Jetty

2012-05-10 Thread soumya_sd
I'm looking for options for achieving this using Camel. 


1. HTTP Client sends a request to my server. 
2. HTTP Controller gets the request, extracts the parameters,  send a
request to "direct:start" using a producer template. 

handleHTTPRequest()
{
.
ProducerTemplate template =
ctxAware.getCamelContext().createProducerTemplate();
template.request("direct:start", new MyCustomProcessor()); 
..
}

My route- 
from("direct:start")
.to("https://some_external_url";)
.unmarshal()
.json(JsonLibrary.Jackson, ResponseObject.class)
.bean(Splitter.class, "splitResponse")
.bean(EmbeddedDroolsRuleEngine.class,
"callRuleEngine");

*ASSUMPTION 1: The controller blocks till the route is finished. Is this
assumption correct ? 
*

3. EmbeddedDroolsRuleEngine#callRuleEngine method does some processing (in
this case filtering based on some rules) on the messages. I need to send
these filtered messages back to the HTTP client. 

My question is - 
once the route is over the control returns back to  the controller if my
ASSUMPTION 1 is correct. 

At this point I want to wait for my results of callRuleEngine method and
somehow get those objects so that I can use it to send a response back to
the client. 



My current idea is to have a EmbeddedDroolsRuleEngine#callRuleEngine write
the results to a queue and then I can have a ConsumerTemplate read from this
queue. But I'm not sure how good a solution this is. 

Any ideas about how to get this done would be appreciated? 


Thanks. 

--
View this message in context: 
http://camel.465427.n5.nabble.com/Options-for-achieving-this-in-Camel-running-inside-Tomcat-or-Jetty-tp5700775.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
Hi Romain,

Is there anyway to get the diagrams generated only when invoking "mvn site".
Generating the diagrams every time we build the project is not ideal.

Thanks!
-Nestor

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


Re: diagram generator

2012-05-10 Thread Romain Manni-Bucau
did you try attaching it to the site phase?

- Romain


2012/5/10 Nestor Urquiza 

> Hi Romain,
>
> Is there anyway to get the diagrams generated only when invoking "mvn
> site".
> Generating the diagrams every time we build the project is not ideal.
>
> Thanks!
> -Nestor
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5700777.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


How to reorder the messages customer by customer?

2012-05-10 Thread sekaijin
Hi.

I have a route that carries messages of various kinds.
as:
Create the customer John Doe.
Create a basket for John Doe.
Add an item "foo" in the basket of John Doe.
Establishing the John Doe bill.

For the system to work I must follow the sequence of messages from John Doe.
if a message from John Doe is in error all posts by John Doe must remain on
hold.
But this should not block messages from other customers.

"camel resequencing" reorders all messages.

How to reorder the messages customer by customer?
I do not understand how to make it with camel resequencing.

There is no concept of global priority

A+JYT

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-reorder-the-messages-customer-by-customer-tp5700947.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
>did you try attaching it to the site phase? 
Thanks!

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


Re: diagram generator

2012-05-10 Thread Romain Manni-Bucau
i looked doclet and package notes.

the package as input needs some refactoring since now 1 input = 1 diagram.
So it means if i allow a package you'll get several diagram in a single
picture (if you want to refactor you can send a pull request ;)).

about the doclet i wonder if javadoc plugin support multiple doclets. I
think you'll loose the uml if you add the camel diagram.

- Romain


2012/5/10 Nestor Urquiza 

> >did you try attaching it to the site phase?
> Thanks!
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5701013.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: how to specify remote file name when using FTP endpoint

2012-05-10 Thread Bengt Rodehav
JIRA created:

https://issues.apache.org/jira/browse/CAMEL-5269

/Bengt

2012/5/10 Claus Ibsen 

> On Thu, May 10, 2012 at 12:59 PM, Bengt Rodehav  wrote:
> > I think it would be a good feature to have. Our integration counterparts
> > often require that the name of the file we send to them is hardcoded (i e
> > it should always be the same name) or conform to a naming standard
> defined
> > by the receiver. But internally, on the sending side, the original file
> is
> > often named completely differently. We then put files that we have
> > correctly handled in an archive directory and the  ones we could not
> handle
> > in a failed directory. In those cases it is important that we locally
> > archive with the original file name to have full traceability.
> >
> > In short, yes support for this would be useful.
> >
>
> Fell free to create a JIRA ticket.
>
> > /Bengt
> >
> > 2012/5/10 Claus Ibsen 
> >
> >> On Thu, May 10, 2012 at 11:23 AM, Bengt Rodehav 
> wrote:
> >> > I do this in Camel 2.7.1 and it definitely changes the name of the
> file
> >> > before ftp:ing:
> >> >
> >> > *theExchange.getIn().setHeader(Exchange.FILE_NAME, "newfilename");*
> >> >
> >>
> >> Yeah you need to store the original file in another header before hand,
> >> and then restore it back again afterwards.
> >>
> >> We may wonder some way of making this easier if this is more commonly
> >> used use-case.
> >> Anyone else picking up files, and storing them using a different file
> >> name, and then have to preserve
> >> the original file name afterwards ?
> >>
> >> > Hope that helps,
> >> >
> >> > /Bengt
> >> >
> >> > 2012/5/10 qwerty5000 
> >> >
> >> >> Thanks guys, but the solution you suggested would rename the files
> after
> >> >> the
> >> >> ftp step so doesn't work.
> >> >>
> >> >> Anyway to retain the original file name? This is necessary as I need
> to
> >> >> perform some local processing after the file has been ftpd, and I
> need
> >> to
> >> >> use the file name as some sort of an uid.
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5699472.html
> >> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >>
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -
> >> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> >> 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/
> >>
>
>
>
> --
> Claus Ibsen
> -
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> 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/
>


Re: diagram generator

2012-05-10 Thread Romain Manni-Bucau
can you try specifying a package instead of a class?

- Romain


2012/5/10 Romain Manni-Bucau 

> i looked doclet and package notes.
>
> the package as input needs some refactoring since now 1 input = 1 diagram.
> So it means if i allow a package you'll get several diagram in a single
> picture (if you want to refactor you can send a pull request ;)).
>
> about the doclet i wonder if javadoc plugin support multiple doclets. I
> think you'll loose the uml if you add the camel diagram.
>
> - Romain
>
>
>
> 2012/5/10 Nestor Urquiza 
>
>> >did you try attaching it to the site phase?
>> Thanks!
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5701013.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>


Re: CXF webservice asyn

2012-05-10 Thread Deepthi
Hi Willem,

Dint quiet understand what you meant by this:
/"Current camel-cxfrs supports the async out of box. 
Please check the code of CxfRsInvoker, it leverages the continuation to 
invoke the async processors"/

Can you provide me with example or any pointers which give me more
information on this?

Thanks

--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-webservice-asyn-tp5695918p5701199.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
Latest from github has not changes and in current version when you specify a
package in  you get:


fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load route
class
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:76)
at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:30)
at
fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:96)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException:
com.nurquiza.orchestration.camel.route
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:73)


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


Re: diagram generator

2012-05-10 Thread Romain Manni-Bucau
are you sure you got
https://github.com/rmannibucau/diagram-generator-parent/commit/f5e4636d45512c008176769a0b75b9144dbf397a
 ?

- Romain


2012/5/10 Nestor Urquiza 

> Latest from github has not changes and in current version when you specify
> a
> package in  you get:
>
>
> fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load
> route
> class
>at
>
> fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:76)
>at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:30)
> at
> fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:96)
>at
>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>at
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:597)
>at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.ClassNotFoundException:
> com.nurquiza.orchestration.camel.route
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>at
>
> fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:73)
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5701216.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: How to prevent HL7 message validation?

2012-05-10 Thread Arjen Duursma
I basically run into the same problem, but do need/want to be able to specify
a validator, not just turn it off.

We have a system in which we receive ACK messages which don't comply to the
orgininal HL7 rules.  We use a custumised ValidationContext to cover for
this.  I would like to build a Camel route accepting the same messages.  Has
any work been done yet to specify a custom validation context?  

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-prevent-HL7-message-validation-tp476085p5701267.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Configure json to use jaxb annotations

2012-05-10 Thread Christian Müller
Hmm, I didn't used it until now, but from my point of view, I would *like*
an API like this one:

JettisonDataFormat jaxbObjectToJsonString = new JettisonDataFormat();
jaxbObjectToJsonString.set...

from("direct:start")
  .marshall(jaxbObjectToJsonString)
  .to("mock:end");

If you think this too, please open a JIRA for it...

Best,
Christian

On Tue, May 8, 2012 at 4:41 PM, Eugeniu  wrote:

> Hi Christian
>
> I used the jettison library shipped with the jaxrs implementation.
>
> Here you can find some more information:
> http://jersey.java.net/nonav/documentation/latest/json.html
>
> This is a link for the library: http://jettison.codehaus.org/Download
>
> And this is a marshal method I used to create a json string from my
> annotated JAXB java class:
>
>public void marshal(Exchange ex) throws JAXBException {
>Configuration conf = new Configuration();
>MappedNamespaceConvention mnc = new MappedNamespaceConvention(conf);
>Writer writer = new StringWriter();
>XMLStreamWriter xmlStreamWriter = new MappedXMLStreamWriter(mnc,
> writer);
>Object obj = ex.getIn().getBody();
>JAXBContext jc = JAXBContext.newInstance(obj.getClass());
>Marshaller marshaller = jc.createMarshaller();
>marshaller.marshal(obj, xmlStreamWriter);
>String json = writer.toString();
>ex.getIn().setBody(json);
>}
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Configure-json-to-use-jaxb-annotations-tp5687484p5694966.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
I was using still the old mercurial repo but now after moving to git:
git clone https://github.com/rmannibucau/diagram-generator-parent.git

I still get the same result for the package option as I stated before:
fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load route
class
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:133)


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


Re: diagram generator

2012-05-10 Thread Romain Manni-Bucau
you should get some (slf4j) log just before.

- Romain


2012/5/10 Nestor Urquiza 

> I was using still the old mercurial repo but now after moving to git:
> git clone https://github.com/rmannibucau/diagram-generator-parent.git
>
> I still get the same result for the package option as I stated before:
> fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load
> route
> class
>at
>
> fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:133)
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5701588.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
ERROR CamelLoader - can't instantiate a builder
java.lang.NullPointerException
at org.apache.xbean.finder.UrlSet.getUrls(UrlSet.java:205)
at org.apache.xbean.finder.UrlSet.(UrlSet.java:45)
at org.apache.xbean.finder.UrlSet.exclude(UrlSet.java:110)
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:114)
at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:40)
at
fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:97)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] can't load route class
com.nestorurquiza.orchestration.camel.route
[INFO]

[INFO] Trace
fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load route
class
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:133)
at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:40)
at
fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:97)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException:
com.nestorurquiza.orchestration.camel.route
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at 

Re: SNMP traps - missing information in the Camel message?

2012-05-10 Thread Jonathan Barber
On 2 May 2012 13:40, Claus Ibsen  wrote:
> Hi
>
> Welcome on the ride.
>
> I suggest If you can then dive into the source code of camel-snmp and
> see if there is something wrong / problem.

I've added another patch
(https://issues.apache.org/jira/browse/CAMEL-5270) to add the address
that the SNMP trap was sent from and the community it was sent with to
the message header.

Cheers
-- 
Jonathan Barber 


recipientList onException not catching CamelExchangeException

2012-05-10 Thread arda.aydin
Hi,

I have a route with recipientList. When there is no consumers available on
the calculated endpoint a org.apache.camel.CamelExchangeException is thrown.

The problem is even i tried many ways, i can't find the way to catch this
exception with onException.

   this.onException(Exception.class).handled(true).process(new
HandleExceptionProcessor());

   this.from("jms://producer1")
.process(flowSelectorProcessor)
.recipientList(header("FlowName"));

How can i catch it ?
Thanks in advance.

My stacktrace:

Caused by: org.apache.camel.CamelExchangeException: No consumers available
on endpoint: Endpoint[direct://idInvalid]. Exchange[Message: ...]
at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:56)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
at
org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:587)
at
org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:516)
at
org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:211)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
at
org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:134)
at 
org.apache.camel.processor.RecipientList.process(RecipientList.java:102)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:273)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:103)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:99)
... 11 more




--
View this message in context: 
http://camel.465427.n5.nabble.com/recipientList-onException-not-catching-CamelExchangeException-tp5701756.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-05-10 Thread Nestor Urquiza

[ERROR] FATAL ERROR
[INFO]

[INFO] can't load route class
com.krfs.orchestration.camel.route
[INFO]

[INFO] Trace
fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load route
class
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:135)
at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:40)
at
fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:97)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException:
com.krfs.orchestration.camel.route
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:91)
... 21 more


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


Re: diagram generator

2012-05-10 Thread Romain Manni-Bucau
Any luck you share a project to reproduce it?

- Romain
Le 11 mai 2012 01:52, "Nestor Urquiza"  a écrit :

>
> [ERROR] FATAL ERROR
> [INFO]
> 
> [INFO] can't load route class
> com.krfs.orchestration.camel.route
> [INFO]
> 
> [INFO] Trace
> fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load
> route
> class
>at
>
> fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:135)
>at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:40)
>at
> fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:97)
>at
>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>at
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:597)
>at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.ClassNotFoundException:
> com.krfs.orchestration.camel.route
>at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>at
>
> fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:91)
>... 21 more
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5701777.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
In fact it is generating both but I guess it keeps the same first name and
the resut is just one class. I have updated the code from the Camel in
Action book as an example. Get it in my svn:


nestor-krfs:cbr nestor$ svn ci -m "showing how package does not generate all
classes but just one despite the log saying it is generating two. With the
input option either OrderRouteBuilder or OrderRouteBuilder2 can be
generated"
Sendingpom.xml
Adding src/main/java/camelinaction/OrderRouteBuilder2.java
Transmitting file data ..svn 
Committed revision 432.
nestor-krfs:cbr nestor$ svn info
Path: .
URL:
https://nestorurquiza.googlecode.com/svn/trunk/camelinaction-based-samples/chapter2/cbr
Repository Root: https://nestorurquiza.googlecode.com/svn
Repository UUID: 2d8599ef-2b56-0410-99ad-bd7dcdf96713
Revision: 429
Node Kind: directory
Schedule: normal
Last Changed Author: nestor.urqu...@gmail.com
Last Changed Rev: 429
Last Changed Date: 2012-03-22 12:49:07 -0400 (Thu, 22 Mar 2012)

nestor-krfs:cbr nestor$ 


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


Re: diagram generator

2012-05-10 Thread Nestor Urquiza
And in my real project I get a weird behavior when I try to use package
instead of input:


[INFO] One or more required plugin parameters are invalid/missing for
'diagram-generator:diagram'

[0] Inside the definition for plugin 'diagram-generator-maven-plugin'
specify the following:


  ...
  VALUE


-OR-

on the command line, specify: '-Ddiagram.input=VALUE'


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


Re: CXF webservice asyn

2012-05-10 Thread Willem Jiang
As CXF doesn't provides the async invocation client for JAXRS, current 
camel-cxfrs doesn't have async producer support.


The document is updated.

On 5/10/12 10:46 PM, Claus Ibsen wrote:

On Thu, May 10, 2012 at 4:11 PM, Willem Jiang  wrote:

Hi

Current camel-cxfrs supports the async out of box.
Please check the code of CxfRsInvoker, it leverages the continuation to
invoke the async processors.



Willem, can you update the Camel docs at
http://camel.apache.org/asynchronous-routing-engine.html

To include the producer for cxfrs.
I am not sure which Camel version that happened.



On 5/9/12 4:09 PM, Claus Ibsen wrote:


Hi

Are you using the CXF-RS producer from Camel, eg you do

from file
   to cxfrs

The cxfrs currently doesn't support the async routing engine by nature
http://camel.apache.org/asynchronous-routing-engine.html

And therefore it blocks while waiting for the reply message.
Frankly it ought to be possible, but I think we need to improve the
camel-cxfrs code to support that.
If it did, then no threads is blocking, and the file consumer thread
would be able to pickup the next
file while the previous CXFRS is in progress.

As mention you can use the threads EIP in Camel to force async behavior as
well.

On Wed, May 9, 2012 at 6:05 AM, Deepthiwrote:


Hi Yogesh,

Thanks for ur response.
Yes, I am looking for a thread pool for from point as well. Appreciate
your
help

Thanks

--
View this message in context:
http://camel.465427.n5.nabble.com/CXF-webservice-asyn-tp5695918p5696434.html
Sent from the Camel - Users mailing list archive at Nabble.com.








--
Willem
--

CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang







--
Willem
--
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Re: SNMP traps - missing information in the Camel message?

2012-05-10 Thread Willem Jiang

I'm working on it now :)

On Fri May 11 07:07:18 2012, Jonathan Barber wrote:

On 2 May 2012 13:40, Claus Ibsen  wrote:

Hi

Welcome on the ride.

I suggest If you can then dive into the source code of camel-snmp and
see if there is something wrong / problem.


I've added another patch
(https://issues.apache.org/jira/browse/CAMEL-5270) to add the address
that the SNMP trap was sent from and the community it was sent with to
the message header.

Cheers




--
Willem
--
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang



Re: How to prevent HL7 message validation?

2012-05-10 Thread Claus Ibsen
On Thu, May 10, 2012 at 9:35 PM, Arjen Duursma  wrote:
> I basically run into the same problem, but do need/want to be able to specify
> a validator, not just turn it off.
>
> We have a system in which we receive ACK messages which don't comply to the
> orgininal HL7 rules.  We use a custumised ValidationContext to cover for
> this.  I would like to build a Camel route accepting the same messages.  Has
> any work been done yet to specify a custom validation context?
>

No currently there is on a boolean option to turn the default on|off.

As we love contributions, fell free to work on this and supply a patch
http://camel.apache.org/contributing.html

> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-to-prevent-HL7-message-validation-tp476085p5701267.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: recipientList onException not catching CamelExchangeException

2012-05-10 Thread Claus Ibsen
Hi

For others reading this as well, please read the highlighted in bold
part of this page, in the _how to get help_ section
http://camel.apache.org/support

Its important for us to know what Camel version you use. There is many releases.
And please spend time beforehand checking with newer releases if its fixed etc.




On Fri, May 11, 2012 at 1:33 AM, arda.aydin  wrote:
> Hi,
>
> I have a route with recipientList. When there is no consumers available on
> the calculated endpoint a org.apache.camel.CamelExchangeException is thrown.
>
> The problem is even i tried many ways, i can't find the way to catch this
> exception with onException.
>
>   this.onException(Exception.class).handled(true).process(new
> HandleExceptionProcessor());
>
>   this.from("jms://producer1")
>        .process(flowSelectorProcessor)
>        .recipientList(header("FlowName"));
>
> How can i catch it ?
> Thanks in advance.
>
> My stacktrace:
>
> Caused by: org.apache.camel.CamelExchangeException: No consumers available
> on endpoint: Endpoint[direct://idInvalid]. Exchange[Message: ...]
>        at
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:56)
>        at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:587)
>        at
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:516)
>        at
> org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:211)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:134)
>        at 
> org.apache.camel.processor.RecipientList.process(RecipientList.java:102)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>        at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)
>        at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:273)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)
>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>        at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:103)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
>        at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:99)
>        ... 11 more
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/recipientList-onException-not-catching-CamelExchangeException-tp5701756.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: Options for achieving this in Camel running inside Tomcat or Jetty

2012-05-10 Thread Claus Ibsen
Hi

Yes the direct producer will block until the message is fully processed.


On Thu, May 10, 2012 at 6:12 PM, soumya_sd  wrote:
> I'm looking for options for achieving this using Camel.
>
>
> 1. HTTP Client sends a request to my server.
> 2. HTTP Controller gets the request, extracts the parameters,  send a
> request to "direct:start" using a producer template.
>
> handleHTTPRequest()
> {
> .
>                ProducerTemplate template =
> ctxAware.getCamelContext().createProducerTemplate();
>                template.request("direct:start", new MyCustomProcessor());
> ..
> }
>
> My route-
>        from("direct:start")
>                                .to("https://some_external_url";)
>                                .unmarshal()
>                                .json(JsonLibrary.Jackson, 
> ResponseObject.class)
>                                .bean(Splitter.class, "splitResponse")
>                                .bean(EmbeddedDroolsRuleEngine.class,
> "callRuleEngine");
>
> *ASSUMPTION 1: The controller blocks till the route is finished. Is this
> assumption correct ?
> *
>
> 3. EmbeddedDroolsRuleEngine#callRuleEngine method does some processing (in
> this case filtering based on some rules) on the messages. I need to send
> these filtered messages back to the HTTP client.
>
> My question is -
> once the route is over the control returns back to  the controller if my
> ASSUMPTION 1 is correct.
>
> At this point I want to wait for my results of callRuleEngine method and
> somehow get those objects so that I can use it to send a response back to
> the client.
>
>
>
> My current idea is to have a EmbeddedDroolsRuleEngine#callRuleEngine write
> the results to a queue and then I can have a ConsumerTemplate read from this
> queue. But I'm not sure how good a solution this is.
>
> Any ideas about how to get this done would be appreciated?
>
>
> Thanks.
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Options-for-achieving-this-in-Camel-running-inside-Tomcat-or-Jetty-tp5700775.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: XStream CannotResolveClassException

2012-05-10 Thread Claus Ibsen
Hi

I suggest to check the unit tests of camel-xstream, and see if there
is some samples that shows this.
And then get back to us with your findings, so others can benefit.


On Wed, May 9, 2012 at 5:33 PM, eismeraldo
 wrote:
> Hi
> Im using camel version 2.9.2. with spring
> I try to unmarshal the message1.xml from the example by  mvn
> archetype:generate #150.
>
> the spring/camel-context.xml looks like
> ---
>        http://camel.apache.org/schema/spring";>
>                
>                        
>                
>                
>                        
>                        
>                        
>                
> ---
>
> and the bean:
> @XStreamAlias("person")
> public class PersonBom {
>        @XStreamAlias("city")
>        private String m_city;
>        @XStreamAlias("firstName")
>        private String m_firstName;
>        @XStreamAlias("lastName")
>        private String m_lastName;
>
> with standard getter and setter
>
> The the system throws the exception:
> [l) thread #1 - file://src/data] DefaultErrorHandler            ERROR Failed
> delivery for (MessageId: ID-CHM05048977-50590-1336575506837-0-1 on
> ExchangeId: ID-CHM05048977-50590-1336575506837-0-2). Exhausted after
> delivery attempt: 1 caught:
> com.thoughtworks.xstream.mapper.CannotResolveClassException: beans
> com.thoughtworks.xstream.mapper.CannotResolveClassException: beans
>        at
> com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:56)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:45)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1035)[xstream-1.4.1.jar:]
>        at
> com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1007)[xstream-1.4.1.jar:]
>        at
> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.unmarshal(AbstractXStreamWrapper.java:211)[camel-xstream-2.9.2.jar:2.9.2]
>        at
> org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:58)[camel-core-2.9.2.jar:2.9.2]
>        at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.9.2.jar:2.9.2]
>        at
> org.apache.came

Re: Load Balancing

2012-05-10 Thread Claus Ibsen
Hi

I am not sure people can follow what your problem is?

If you want error handling then read about Camel error handling, and
the links from this page
http://camel.apache.org/error-handling-in-camel.html

And there is also a failover load balancer
http://camel.apache.org/load-balancer.html

See if those links help you a bit.
And then come back later if you still have some questions.


On Thu, May 10, 2012 at 5:09 PM, Rocco Gallo Citera
 wrote:
> Hello, sorry to bother but I have a problem understanding how load
> balancing works with some endpoints.
> Basically, I have the following route in a client:
> from(timer endpoint)
> .loadbalance().roundrobin() (with other types of load balancing the
> problem is similar)
> .to(http endpoint 1, http endpoint 2)
> .end;
>
> from(http endpoint) // both endpoints have the same behavior
> .to(file endpoint)
>
> In the server, I have
> from(jetty endpoint).
> .process(my process)
> .to(hazelcast endpoint)
>
> If I don't use the load balance, the example works great, but with it,
> any onException are not caught (I can see them on a logging console).
> If I use a TCPMon in between the client and the server, I see a
> continuous flow with a connection switch every time the starting timer
> triggers, but I expected the timer to start the exchange and write now
> it just switch connection, so I don't understand why. I tried to find
> any documentation about that but none was found. Can anyone please
> help me to understand why this behavior happens? I'm using Camel
> 2.9.2.
>
> Thank you very much.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/


Re: recipientList onException not catching CamelExchangeException

2012-05-10 Thread arda.aydin
Hi Claus,

You're right, sorry for the absence of version number (just an oversight).
First i was using 2.6.0 as i had no solution i also tried with
2.9.3-SNAPSHOT i still have this issue.

Cheers,
Arda


--
View this message in context: 
http://camel.465427.n5.nabble.com/recipientList-onException-not-catching-CamelExchangeException-tp5701756p5702241.html
Sent from the Camel - Users mailing list archive at Nabble.com.