Memory leak - when an exception is thrown during the scheduling phase

2013-10-04 Thread Nurali Techie
Hello,



I have observed a memory leak for Quartz worker thread in case an exception is 
thrown during the scheduling phase when schedule is set to past time.
I have observed this issue with camel-quart 2.10.4, 2.11.0, 2.11.2 versions.

For ex, assuming today is 4-Oct; If a schedule is provided for yesterday (i.e 
3-Oct) then below sequence happen:

1. Quartz create worker thread for new schedule [generally TEN Threads with 
name 'DefaultQuartzScheduler']
2. Camel-quartz increment jobCounter for scheduler context [using 
QuartzComponent.incrementJobCounter()]
3. Camel-quartz tries to create new schedule [using Scheduler.scheduleJob()]
4. scheduleJob() throws SchedulerException with the message - 'Based on 
configured schedule, the given trigger will never fire'
5. Camel-quartz does NOT decrement the job counter and jobCounter value remains 
'1'
6. Later Camel-Quartz stops the route and call QuartzComponent.doStop()
7. In doStop(), Scheduler.shutdown() supposed to be called so that those TEN 
threads are removed but to call shutdown() the pre-condition is that the 
jobCounter should be '0'.  In this case jobCounter is '1' and 
Scheduler.shutdown() will NOT be called and those TEN threads are NOT removed.  
This is memory leak.

Please find the stack trace [with Camel-Quartz 2.11.2 and 
org.apache.servicemix.bundles.quartz-1.8.6_1 which wrapped Quartz Scheduler as 
OSGi bundle] when SchedulerException is thrown at step 4 in above sequence.

Let me know if you want me to create JIRA issue.

Thanks,
Nurali

** Stack Trace:

15:55:22.432 ERROR [Blueprint Extender: 1] o.a.c.b.BlueprintCamelContext 
[BlueprintCamelContext.java:139] - Error occurred during starting Camel: 
CamelContext(sfsftest35) due Based on configured schedule, the given trigger 
will never fire.
org.quartz.SchedulerException: Based on configured schedule, the given trigger 
will never fire.
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:793) 
~[na:na]
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243) ~[na:na]
at 
org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:232)
 ~[na:na]
at 
org.apache.camel.component.quartz.QuartzComponent.addJob(QuartzComponent.java:222)
 ~[na:na]
at 
org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:81)
 ~[na:na]
at 
org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:213)
 ~[na:na]
at 
org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
 ~[na:na]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1819)
 ~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2113)
 ~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2049)
 ~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1979)
 ~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1758)
 ~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1633)
 ~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1500)
 ~[na:na]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
~[na:na]
at 
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1468) 
~[na:na]
at 
org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:167)
 [bundlefile:2.11.2]
at 
org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:199)
 [bundlefile:2.11.2]
at 
org.apache.camel.blueprint.BlueprintCamelContext.serviceChanged(BlueprintCamelContext.java:137)
 [bundlefile:2.11.2]
at 
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
 [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
 [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
at 
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
 [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
 [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
 [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
at 
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.jav

AW: Camel developer's guide still refers to SVN

2013-10-04 Thread Walzer, Thomas
http://camel.apache.org/how-do-i-become-a-committer.html has a few references 
to SVN

Thomas.

-Ursprüngliche Nachricht-
Von: Dale King [mailto:dalewk...@gmail.com] 
Gesendet: Donnerstag, 03. Oktober 2013 14:29
An: users@camel.apache.org
Betreff: Re: Camel developer's guide still refers to SVN

Sorry, it's the contributing link, not the developer's guide On Oct 3, 2013 
5:15 AM, "Claus Ibsen"  wrote:

> Hi
>
> I dont see this. Can you post links and where on the page you see 
> something about SVN.
>
> On Wed, Oct 2, 2013 at 5:21 PM, Dale King  wrote:
> > The developer's guide still has lots of references to SVN, which no
> longer apply now that Camel is on git. Since you depend so heavily on 
> others for fixes, you might want to make sure this document is accurate.
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>


Re: Camel developer's guide still refers to SVN

2013-10-04 Thread Claus Ibsen
Thanks I updated that page.

On Fri, Oct 4, 2013 at 10:46 AM, Walzer, Thomas
 wrote:
> http://camel.apache.org/how-do-i-become-a-committer.html has a few references 
> to SVN
>
> Thomas.
>
> -Ursprüngliche Nachricht-
> Von: Dale King [mailto:dalewk...@gmail.com]
> Gesendet: Donnerstag, 03. Oktober 2013 14:29
> An: users@camel.apache.org
> Betreff: Re: Camel developer's guide still refers to SVN
>
> Sorry, it's the contributing link, not the developer's guide On Oct 3, 2013 
> 5:15 AM, "Claus Ibsen"  wrote:
>
>> Hi
>>
>> I dont see this. Can you post links and where on the page you see
>> something about SVN.
>>
>> On Wed, Oct 2, 2013 at 5:21 PM, Dale King  wrote:
>> > The developer's guide still has lots of references to SVN, which no
>> longer apply now that Camel is on git. Since you depend so heavily on
>> others for fixes, you might want to make sure this document is accurate.
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> Email: cib...@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



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


Re: The facebook component does not read headers values ?

2013-10-04 Thread Emilien
Thanks for your reply,

The JIRA is  CAMEL-6822  
.

Hope the patch could help.

Best,
Emilien



--
View this message in context: 
http://camel.465427.n5.nabble.com/The-facebook-component-does-not-read-headers-values-tp5740818p5740862.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Simulating a periodic producer

2013-10-04 Thread prgtrdr
Thanks for trying to help Robert.  Let me clarify my confusing post.

I'm writing a GUI app that shows inventory level for a widget.  The level
changes periodically as customers buy and we receive replenishment.  So the
GUI updates the quantity on hand as soon as a purchase is made, then when
another purchase is made in 2 minutes it would update then, then we receive
new supply in 4 minutes another update shows at that time, etc.  The GUI
reads all these events from an ActiveMQ topic so I can have multiple
instances subscribed simultaneously.

For testing I wrote an order simulator program that attaches to the topic
and sends order events with random delays between each message.  The GUI
reacts appropriately, i.e., I can see the levels change periodically.  Now
the sales force wants to play with the program for acceptance but they want
to be able to look at it continuously.  To do this they need to see the
screen change but if I leave the order simulator program running it will
generate thousands of unneeded messages and clog up my server.

Instead, I realize that I can replay the messages that I already sent to the
topic by adding destination.consumer.retroactive=true to the 
endpoint.  But when the messages play back there is no delay between them so
the screen just shows the result after the last message.  The sales people
are confused.  I need to slow it down.  So I added a delay to my DSL as
follows:


Slow producer simulation for
Orders


2000



Now the GUI changes every 2 seconds.  But once we read the last message on
the topic the route just waits for more messages that never come in (because
the simulator isn't running).  What I need is a way to restart the route
once we reach the end of the messages on the topic.

I'm thinking that I could use a Polling Consumer EIP with receiveNoWait and
if a null Exchange is received, I should schedule a new instance of the
route, and then stop the current route.  But I'm at a loss as to how to do
this with XML.  Can you help?

Thanks,
Bill



--
View this message in context: 
http://camel.465427.n5.nabble.com/Simulating-a-periodic-producer-tp5740783p5740867.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Memory leak - when an exception is thrown during the scheduling phase

2013-10-04 Thread James Carman
Create a JIRA.  Looks like you may have a patch in mind?  Do you have test
cases?

On Friday, October 4, 2013, Nurali Techie wrote:

> Hello,
>
>
>
> I have observed a memory leak for Quartz worker thread in case an
> exception is thrown during the scheduling phase when schedule is set to
> past time.
> I have observed this issue with camel-quart 2.10.4, 2.11.0, 2.11.2
> versions.
>
> For ex, assuming today is 4-Oct; If a schedule is provided for yesterday
> (i.e 3-Oct) then below sequence happen:
>
> 1. Quartz create worker thread for new schedule [generally TEN Threads
> with name 'DefaultQuartzScheduler']
> 2. Camel-quartz increment jobCounter for scheduler context [using
> QuartzComponent.incrementJobCounter()]
> 3. Camel-quartz tries to create new schedule
> [using Scheduler.scheduleJob()]
> 4. scheduleJob() throws SchedulerException with the message - 'Based on
> configured schedule, the given trigger will never fire'
> 5. Camel-quartz does NOT decrement the job counter and jobCounter value
> remains '1'
> 6. Later Camel-Quartz stops the route and call QuartzComponent.doStop()
> 7. In doStop(), Scheduler.shutdown() supposed to be called so that those
> TEN threads are removed but to call shutdown() the pre-condition is that
> the jobCounter should be '0'.  In this case jobCounter is '1'
> and Scheduler.shutdown() will NOT be called and those TEN threads are NOT
> removed.  This is memory leak.
>
> Please find the stack trace [with Camel-Quartz 2.11.2 and
> org.apache.servicemix.bundles.quartz-1.8.6_1 which wrapped Quartz Scheduler
> as OSGi bundle] when SchedulerException is thrown at step 4 in above
> sequence.
>
> Let me know if you want me to create JIRA issue.
>
> Thanks,
> Nurali
>
> ** Stack Trace:
>
> 15:55:22.432 ERROR [Blueprint Extender: 1] o.a.c.b.BlueprintCamelContext
> [BlueprintCamelContext.java:139] - Error occurred during starting Camel:
> CamelContext(sfsftest35) due Based on configured schedule, the given
> trigger will never fire.
> org.quartz.SchedulerException: Based on configured schedule, the given
> trigger will never fire.
> at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:793)
> ~[na:na]
> at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243) ~[na:na]
> at
> org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:232)
> ~[na:na]
> at
> org.apache.camel.component.quartz.QuartzComponent.addJob(QuartzComponent.java:222)
> ~[na:na]
> at
> org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:81)
> ~[na:na]
> at
> org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:213)
> ~[na:na]
> at
> org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
> ~[na:na]
> at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1819)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2113)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2049)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1979)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1758)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1633)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1500)
> ~[na:na]
> at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> ~[na:na]
> at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1468)
> ~[na:na]
> at
> org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:167)
> [bundlefile:2.11.2]
> at
> org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:199)
> [bundlefile:2.11.2]
> at
> org.apache.camel.blueprint.BlueprintCamelContext.serviceChanged(BlueprintCamelContext.java:137)
> [bundlefile:2.11.2]
> at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
> [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
> [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
> at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> [org.eclipse.org.eclipse.osgi-3.8.0.v20120529-1548.jar:na]
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
> [org.eclipse.org.eclipse.osgi-3.8.0

Consuming WSDL file

2013-10-04 Thread Ankur
Hi All,

I'm new to camel & webservices. 
I have one WSDL file which is published on different server. I want to
consume that wsdl file. After retrieving data from WSDL file i need to save
data in Database.

I have to use spring DSL instead of Java DSL. I'm trying with cxf component
but not able to make it work.

Could anyone help me out in this . I just have WSDL url with me nothing
else.

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Consuming-WSDL-file-tp5740871.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel + myBatis Issue

2013-10-04 Thread Ankur
Thank you all for your help.
I'm able to resolve the issues. i have changed my query to achieve this
result



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


Camel BAM in Spring XML

2013-10-04 Thread Ondrej_Fialka
Hello,
I'm trying to use BAM for timeouts in routing. I use Spring XML as the DSL,
but I have only found examles on BAM in Java and was not able to figure out
whether it is supported in Spring XML as well.
Is there a way to define ActivityBuilders in XML or to have them in Java and
connect them with routes in XML?
Thank you for help.
Ondrej



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-BAM-in-Spring-XML-tp5740873.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel BAM in Spring XML

2013-10-04 Thread Claus Ibsen
Hi

No you need to use the java code.

On Fri, Oct 4, 2013 at 2:31 PM, Ondrej_Fialka  wrote:
> Hello,
> I'm trying to use BAM for timeouts in routing. I use Spring XML as the DSL,
> but I have only found examles on BAM in Java and was not able to figure out
> whether it is supported in Spring XML as well.
> Is there a way to define ActivityBuilders in XML or to have them in Java and
> connect them with routes in XML?
> Thank you for help.
> Ondrej
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-BAM-in-Spring-XML-tp5740873.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Issue with Transactions and Split

2013-10-04 Thread gquintana
How did you declare the transaction manager? Something like:




--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-Transactions-and-Split-tp5738618p5740888.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue with Transactions and Split

2013-10-04 Thread abdiels
First let me thank you for replying...Here is what I have in my XML




















let me know if you need any additional information.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-Transactions-and-Split-tp5738618p5740889.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Simulating a periodic producer

2013-10-04 Thread Chris
Maybe you could implement a custom RoutePolicy to stop, then restart 
your route from the top after a certain fixed number of messages are 
processed.


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

On 10/4/2013 6:30 AM, prgtrdr wrote:

Thanks for trying to help Robert.  Let me clarify my confusing post.

I'm writing a GUI app that shows inventory level for a widget.  The level
changes periodically as customers buy and we receive replenishment.  So the
GUI updates the quantity on hand as soon as a purchase is made, then when
another purchase is made in 2 minutes it would update then, then we receive
new supply in 4 minutes another update shows at that time, etc.  The GUI
reads all these events from an ActiveMQ topic so I can have multiple
instances subscribed simultaneously.

For testing I wrote an order simulator program that attaches to the topic
and sends order events with random delays between each message.  The GUI
reacts appropriately, i.e., I can see the levels change periodically.  Now
the sales force wants to play with the program for acceptance but they want
to be able to look at it continuously.  To do this they need to see the
screen change but if I leave the order simulator program running it will
generate thousands of unneeded messages and clog up my server.

Instead, I realize that I can replay the messages that I already sent to the
topic by adding destination.consumer.retroactive=true to the 
endpoint.  But when the messages play back there is no delay between them so
the screen just shows the result after the last message.  The sales people
are confused.  I need to slow it down.  So I added a delay to my DSL as
follows:

 
 Slow producer simulation for
Orders
 
 
 2000
 
 

Now the GUI changes every 2 seconds.  But once we read the last message on
the topic the route just waits for more messages that never come in (because
the simulator isn't running).  What I need is a way to restart the route
once we reach the end of the messages on the topic.

I'm thinking that I could use a Polling Consumer EIP with receiveNoWait and
if a null Exchange is received, I should schedule a new instance of the
route, and then stop the current route.  But I'm at a loss as to how to do
this with XML.  Can you help?

Thanks,
Bill



--
View this message in context: 
http://camel.465427.n5.nabble.com/Simulating-a-periodic-producer-tp5740783p5740867.html
Sent from the Camel - Users mailing list archive at Nabble.com.



How to programmatically find next downstream endpoint in a route.

2013-10-04 Thread Chris

Hello,

I implemented a bean whose method accepts an exchange with a single 
message, then generates multiple messages intended for the next endpoint 
down-stream, along the lines of this:


http://camel.apache.org/how-do-i-write-a-custom-processor-which-sends-multiple-messages.html


However, I'd like to avoid having to explicitly configure the endpoint 
in the bean's ProducerTemplate if it can be found in the route definition.


In other words, if I have:

from("direct:start")
.enrich("bean:MyBean")
.to("mock:result");  <<< this should be sufficient to indicate producer 
target URI.


...and MyBean is:

public MyBean {
  protected ProducerTemplate producer;
  public void businessLogic(Exchange exchange) {
  if (producer == null) {
  producer = exchange.createProducerTemplate();
  producer.setDefaultEndpointUri("mock:result"); <<< Why should 
I have to do this?  I just want it to go to the next down-stream 
endpoint in the pipeline, already defined in the route!!

  }
  [...bla, bla, bla...]
  while (hasStuffToSend) {
  producer.setBody(stuff[i]);
  }
  }
}




Re: How to programmatically find next downstream endpoint in a route.

2013-10-04 Thread James Carman
Does a splitter not work for you in this case?

On Fri, Oct 4, 2013 at 1:28 PM, Chris  wrote:
> Hello,
>
> I implemented a bean whose method accepts an exchange with a single message,
> then generates multiple messages intended for the next endpoint down-stream,
> along the lines of this:
>
> http://camel.apache.org/how-do-i-write-a-custom-processor-which-sends-multiple-messages.html
>
>
> However, I'd like to avoid having to explicitly configure the endpoint in
> the bean's ProducerTemplate if it can be found in the route definition.
>
> In other words, if I have:
>
> from("direct:start")
> .enrich("bean:MyBean")
> .to("mock:result");  <<< this should be sufficient to indicate producer
> target URI.
>
> ...and MyBean is:
>
> public MyBean {
>   protected ProducerTemplate producer;
>   public void businessLogic(Exchange exchange) {
>   if (producer == null) {
>   producer = exchange.createProducerTemplate();
>   producer.setDefaultEndpointUri("mock:result"); <<< Why should I
> have to do this?  I just want it to go to the next down-stream endpoint in
> the pipeline, already defined in the route!!
>   }
>   [...bla, bla, bla...]
>   while (hasStuffToSend) {
>   producer.setBody(stuff[i]);
>   }
>   }
> }
>
>


Re: Simulating a periodic producer

2013-10-04 Thread prgtrdr
That's a great idea, Chris.  I'm going to give it a try.

Thanks,
Bill



--
View this message in context: 
http://camel.465427.n5.nabble.com/Simulating-a-periodic-producer-tp5740783p5740893.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel FOP using which fop version

2013-10-04 Thread Ericson, Dean - 0551 - MITLL
Does anyone know how if the version of the apache fop engine camel-fop uses
is configurable?  I noticed that fop v1.0 seems to have issues rendering
header/footer content, but that it's been fixed in v1.1.  I've looked
through the camel-fop site/documentation 
, but thus far have not found the information I am looking for.

 

Thank you,

Dean

 



smime.p7s
Description: S/MIME cryptographic signature


Re: Consuming WSDL file

2013-10-04 Thread Christian Müller
I assume you have to provide a web service to your clients and you have to
store the requests in a database? If so, I recommend to have a look at the
CXF component [1] for providing the web service. For storing data in a
database, please have a look at the SQL component [2].
Having a look at [3] shouldn't be worst to get some inspiration... ;-)

[1] http://camel.apache.org/cxf.html
[2] http://camel.apache.org/sql-component.html
[3] http://camel.apache.org/examples.html

Best,

Christian
-

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Fri, Oct 4, 2013 at 2:02 PM, Ankur wrote:

> Hi All,
>
> I'm new to camel & webservices.
> I have one WSDL file which is published on different server. I want to
> consume that wsdl file. After retrieving data from WSDL file i need to save
> data in Database.
>
> I have to use spring DSL instead of Java DSL. I'm trying with cxf component
> but not able to make it work.
>
> Could anyone help me out in this . I just have WSDL url with me nothing
> else.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Consuming-WSDL-file-tp5740871.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Issue with Transactions and Split

2013-10-04 Thread Baris Acar
The comment in the link below - if true - indicates that the jms component 
(which the activemq component is based on) is "not designed for batched 
transactions" and doesn't support consuming multiple messages in a single 
transaction; I don't know whether that also means it won't post a batch of 
messages in a single Tx, or not.

http://camel.465427.n5.nabble.com/Consuming-multiple-JMS-messages-in-one-single-transaction-td5640489.html

It's not even clear to me, if you didn't have the split (so 1 msg in=1 msg 
out), whether the send takes place in the same transaction as the consume or 
not. 

Camel experts - can a local transaction span multiple operations, if those 
operations -- in this case, a consume and a produce -- are against the same 
resource (jms broker)? It's unclear to me, especially when there's a split(), 
how many transactions there are and when they get committed.

Barış

> On 4 Oct 2013, at 18:08, abdiels  wrote:
> 
> First let me thank you for replying...Here is what I have in my XML
> 
> 
> class="org.apache.activemq.camel.component.ActiveMQComponent">
> 
>
> 
>
>
> 
> 
> class="org.springframework.jms.connection.JmsTransactionManager">
> 
>
>
> 
> 
> class="org.apache.activemq.ActiveMQConnectionFactory">
>
>
> 
> let me know if you need any additional information.
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Issue-with-Transactions-and-Split-tp5738618p5740889.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel FOP using which fop version

2013-10-04 Thread Christian Müller
Camel 2.12.1 is using fop 1.0:

camel-fop cmueller$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO]

[INFO] Building Camel :: FOP 2.12.1
[INFO]

[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ camel-fop ---
[INFO] org.apache.camel:camel-fop:bundle:2.12.1
[INFO] +- org.apache.camel:camel-core:jar:2.12.1:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] |  \- com.sun.xml.bind:jaxb-impl:jar:2.1.13:compile
[INFO] | \- javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO] |+- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |\- javax.activation:activation:jar:1.1:compile
[INFO] +- org.apache.xmlgraphics:fop:jar:1.0:compile
[INFO] |  +- org.apache.xmlgraphics:xmlgraphics-commons:jar:1.4:compile
[INFO] |  +- org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-anim:jar:1.7:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-dom:jar:1.7:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-parser:jar:1.7:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-util:jar:1.7:compile
[INFO] |  |  \- xml-apis:xml-apis-ext:jar:1.3.04:compile
[INFO] |  +- org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-script:jar:1.7:compile
[INFO] |  |  |  \- org.apache.xmlgraphics:batik-js:jar:1.7:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-xml:jar:1.7:compile
[INFO] |  |  \- xalan:xalan:jar:2.7.1:compile
[INFO] |  +- org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile
[INFO] |  +- org.apache.xmlgraphics:batik-gvt:jar:1.7:compile
[INFO] |  +- org.apache.xmlgraphics:batik-transcoder:jar:1.7:compile
[INFO] |  |  \- org.apache.xmlgraphics:batik-svggen:jar:1.7:compile
[INFO] |  +- org.apache.xmlgraphics:batik-extension:jar:1.7:compile
[INFO] |  +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  +- commons-io:commons-io:jar:1.3.1:compile
[INFO] |  +-
org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile
[INFO] |  \-
org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile
[INFO] +- org.apache.camel:camel-test:jar:2.12.1:test
[INFO] |  \- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.apache.pdfbox:pdfbox:jar:1.6.0:test
[INFO] |  +- org.apache.pdfbox:fontbox:jar:1.6.0:test
[INFO] |  \- org.apache.pdfbox:jempbox:jar:1.6.0:test
[INFO] +- xalan:serializer:jar:2.7.1:test
[INFO] |  \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] \- org.slf4j:slf4j-log4j12:jar:1.7.5:test
[INFO]\- log4j:log4j:jar:1.2.17:test
[INFO]

[INFO] BUILD SUCCESS
[INFO]


You can try to use a newer version (fop 1.1), if it's backwards compatible.
I will try to update Camel 2.13-SNAPSHOT to fop 1.1...

Best,

Christian
-

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Fri, Oct 4, 2013 at 7:21 PM, Ericson, Dean - 0551 - MITLL <
dean.eric...@ll.mit.edu> wrote:

> Does anyone know how if the version of the apache fop engine camel-fop
> uses is configurable?  I noticed that fop v1.0 seems to have issues
> rendering header/footer content, but that it’s been fixed in v1.1.  I’ve
> looked through the camel-fop 
> site/documentation,
> but thus far have not found the information I am looking for.
>
> ** **
>
> Thank you,
>
> Dean
>
> ** **
>


Re: The Camel Components Poster - PDF - FREE

2013-10-04 Thread Christian Müller
Hi Robert!

Thanks for your good work. We appreciate it. It looks really cool and I
think this poster provides a good overview which components do we have in
each particular area.

As outlined in [1] and mentioned by James, you should
- refer to "The Apache Camel Components Poster" instead of "The Camel
Components Poster"

Thanks for your cooperation and willing to update the poster.

I don't think it's an issue to have the "GLIESIAN, LLC." whatermark and
footer, but prefer to have the trademarks ok. Therefore, I also put
trademarks@ in CC to request their permission that you can publish/sell
this poster [2] after the mentioned update.

[1] http://www.apache.org/foundation/marks/#guidelines
[2] http://gliesian.com/camel/TheCamelComponentPosterWithWatermark.pdf

Best,

Christian Müller
V.P. Apache Camel


On Fri, Oct 4, 2013 at 12:22 AM, gliesian  wrote:

> Hi James,
>
> I looked at the cover of the "Camel in Action" book and "Apache" is not
> mentioned anywhere:
>
> http://www.amazon.com/Camel-Action-Claus-Ibsen/dp/1935182366/ref=sr_1_1?ie=UTF8&qid=1380838736&sr=8-1&keywords=camel+in+action
>
> So, I figured that the approach I took with the title of the poster was
> okay, "The Camel Components Poster".
>
> I do mention Apache in a few places on the poster...
> (1) Bottom left: Camel Components (Apache and External)
> (2) Bottom right: http://camel.apache.org/components.html
> (3) In some of the descriptions: e.g. Apache ServiceMix.
>
> I can update the poster anyway that is appropriate, please just let me know
> exactly what to do, and I will do it.
>
> Sincerely,
> Robert Liguori
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/The-Camel-Components-Poster-PDF-FREE-tp5740752p5740847.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: The Camel Components Poster - PDF - FREE

2013-10-04 Thread James Carman
Thanks, Shane!  We appreciate your guidance.

James

On Fri, Oct 4, 2013 at 5:12 PM, Shane Curcuru  wrote:
> (Please note the mix of mailing lists)
>
> The most important thing is that Apache product brands are referred to by
> their full name - i.e. Apache Camel - in at least both the first and most
> prominent places in a document.  That means the title (either graphically in
> the display, or the window title in a PDF viewer, whatever) should include
> "Apache Camel" wherever practical.
>
> Beyond that, this looks like a great poster; I wasn't even aware of how many
> different direct integration points are already out there!
>
> Since this is clearly educational materials, a cheatsheet, or additional
> documentation about Apache Camel and related software that goes above and
> beyond what the camel.apache.org website provides as normal documentation,
> it's perfectly appropriate to include a footer or other "Created by"
> attribution for whoever does the work to create this.  So the logo in the
> footer is fine, especially because it's not directly with the Camel name or
> logo.  It's certainly appropriate for your company to get credit for the
> design!
>
> As a volunteer-run public charity that produces software for the public
> good, we need to ensure that our trademarks are respected, especially by
> software vendors of all stripes.  However outside individuals and companies
> producing extra educational materials about Apache software - like training,
> books, and cool API docs like this - can help users to find out about and
> make use of Apache software, which is a benefit to everyone.  As long as our
> brands are respected, we definitely appreciate the work people do like this.
>
> Thanks,
> - Shane Curcuru
>   VP, Brand Management
>
>
>
>
> On 10/4/13 5:00 PM, Christian Müller wrote:
>>
>> Hi Robert!
>>
>> Thanks for your good work. We appreciate it. It looks really cool and I
>> think this poster provides a good overview which components do we have
>> in each particular area.
>>
>> As outlined in [1] and mentioned by James, you should
>> - refer to "The Apache Camel Components Poster" instead of "The Camel
>> Components Poster"
>>
>> Thanks for your cooperation and willing to update the poster.
>>
>> I don't think it's an issue to have the "GLIESIAN, LLC." whatermark and
>> footer, but prefer to have the trademarks ok. Therefore, I also put
>> trademarks@ in CC to request their permission that you can publish/sell
>> this poster [2] after the mentioned update.
>>
>> [1] http://www.apache.org/foundation/marks/#guidelines
>> [2] http://gliesian.com/camel/TheCamelComponentPosterWithWatermark.pdf
>>
>> Best,
>>
>> Christian Müller
>> V.P. Apache Camel
>>
>>
>> On Fri, Oct 4, 2013 at 12:22 AM, gliesian > > wrote:
>>
>> Hi James,
>>
>> I looked at the cover of the "Camel in Action" book and "Apache" is
>> not
>> mentioned anywhere:
>>
>> http://www.amazon.com/Camel-Action-Claus-Ibsen/dp/1935182366/ref=sr_1_1?ie=UTF8&qid=1380838736&sr=8-1&keywords=camel+in+action
>>
>> So, I figured that the approach I took with the title of the poster
>> was
>> okay, "The Camel Components Poster".
>>
>> I do mention Apache in a few places on the poster...
>> (1) Bottom left: Camel Components (Apache and External)
>> (2) Bottom right: http://camel.apache.org/components.html
>> (3) In some of the descriptions: e.g. Apache ServiceMix.
>>
>> I can update the poster anyway that is appropriate, please just let
>> me know
>> exactly what to do, and I will do it.
>>
>> Sincerely,
>> Robert Liguori
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>>
>> http://camel.465427.n5.nabble.com/The-Camel-Components-Poster-PDF-FREE-tp5740752p5740847.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>


Spring-defined routes in akka-camel 2.2.1

2013-10-04 Thread nw31304
I'm trying to use the akka-camel support to consume from a Camel endpoint
from an akka 2.2.1 Actor.  However, I'd like to define the endpoint as
belonging to a routes in a CamelContext defined in a Spring XML file. 
Something roughly like:  and then receive it in an actor, like so:This fails
spectacularly, as there are two contexts created:  one by Akka as part of
the Consumer trait, the other as a result of the camelContext contained in
the XML file.  And each has a distinct seda component within. I've read 
https://weblogs.java.net/blog/manningpubs/archive/2013/02/13/akka-and-camel
  
and attempted to use the akka:camel-service bean and inject a CamelContext
defined in the same Spring file, but it seems Akka has removed the Spring
namespace handler in recent releases (see:  here

 
).   I continue to use dependence injection using the IndirectActorProducer,
but it seems I can't create Akka's CamelService using Spring injection.  I
next tried to programmatically instruct akka to use my spring-defined
CamelContext via the CamelContextManager object, but it seems that object
has been removed as well -- at least it is no longer in the akka-camel
source for 2.2.1.So I'm out of ideas.  Can anyone offer any insight into how
to have an Akka 2.2 Actor consume from an endpoint that is configured within
a Spring XML file?Thanks in advance.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-defined-routes-in-akka-camel-2-2-1-tp5740905.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Creating routes dynamically like a for()

2013-10-04 Thread gudiseashok
See if this helps you ...

//Calling to create a router - or loop this 

AppsRouteBuilder.getInstance().addRouter(camelContext, "{add router id}",
true,
"{add your "*from*" string here}",  new 
String[] {"***One or ***","more
"To" strings here"});

Note#// You can loop above one, if you have control/can maintain routeIDs,
because you need that incase you want to stop or delete a particuar route by
id.

//Dynamic RouteBuilder to add Routers at run-time (method)
public void addRouter(CamelContext camelContext, final String routeId,final
boolean multiCast, 
final String from, final String[] to){
try{
if(camelContext == null){
camelContext = new DefaultCamelContext();
}
RouteBuilder routeBuilder = new RouteBuilder() {
public void configure() {
RouteDefinition routeDefinition = 
from(from).routeId(routeId);
for(String currentTo:to){
log.debug("Added To "+currentTo);
if(multiCast){

routeDefinition.multicast().to(currentTo);
}else{

routeDefinition.to(currentTo);
}
}
}
};
routeBuilder.addRoutesToCamelContext(camelContext);
}catch(Exception e){
e.printStackTrace();
}
}

---
Hope this works for you, or my apologies if I mis-guided you because I am
also a co-learner :-)




--
View this message in context: 
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703p5740908.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: The Camel Components Poster - PDF - FREE

2013-10-04 Thread gliesian
Thanks for the information and guidance.

I will make the necessary updates to the poster tonight.

If anyone else has information or direction to offer, please advise me.

Thanks,
Robert



--
View this message in context: 
http://camel.465427.n5.nabble.com/The-Camel-Components-Poster-PDF-FREE-tp5740752p5740904.html
Sent from the Camel - Users mailing list archive at Nabble.com.