Camel JPA Thread Hung

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Camel JPA Thread Hung

Gnana
Hi All, I have created one route which has JPA component to poll the records from DB periodically. it is working good. I hope each route has one worker thread. if DB is down or any N/W issue for minute, route is not working as expected. application is running.( it is not polling records from DB even after DB or N/W is up ). I think worker thread got hung and route is not working. please anybody help me to fix this issue. How to avoid this worker thread hung ? How to restart the worker thread once N/W or DB is up ?
Reply | Threaded
Open this post in threaded view
|

Re: Camel JPA Thread Hung

0x001d
Hi

could you provide the route you defined with the parameters defined?

Marcel

> On 17 Feb 2017, at 00:06, Gnana <[hidden email]> wrote:
>
> Hi All,I have created one route which has JPA component to poll the records
> from DB periodically. it is working good. I hope each route has one worker
> thread. if DB is down or any N/W issue for minute, route is not working as
> expected. application is running.( it is not polling records from DB even
> after DB or N/W is up ). I think worker thread got hung and route is not
> working. please anybody help me to fix this issue.How to avoid this worker
> thread hung ?How to restart the worker thread once N/W or DB is up ?    
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-JPA-Thread-Hung-tp5794001.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Camel JPA Thread Hung

Gnana
<from uri="jpa://br.rafaeltuelho.model.Customer?consumer.namedQuery=Customer.findAll&amp;consumer.delay=30000&amp;consumeDelete=true" />
    <log message="-&gt; [List content]: ${body}"/>
Reply | Threaded
Open this post in threaded view
|

Re: Camel JPA Thread Hung

Claus Ibsen-2
In reply to this post by Gnana
I would start look at your jdbc driver and connection pooling how that
is configured to have a way of "heal" broken connections

On Fri, Feb 17, 2017 at 12:06 AM, Gnana <[hidden email]> wrote:

> Hi All,I have created one route which has JPA component to poll the records
> from DB periodically. it is working good. I hope each route has one worker
> thread. if DB is down or any N/W issue for minute, route is not working as
> expected. application is running.( it is not polling records from DB even
> after DB or N/W is up ). I think worker thread got hung and route is not
> working. please anybody help me to fix this issue.How to avoid this worker
> thread hung ?How to restart the worker thread once N/W or DB is up ?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-JPA-Thread-Hung-tp5794001.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: Camel JPA Thread Hung

Gnana
In reply to this post by Gnana
SimpleRegistry registry = new SimpleRegistry();
registry.put("datasource",myDataSourceObj);
CamelContext context = new DefaultCamelContext(registry);
context.addRoutes(new myRouteBuilder());

from URI= "uri="jpa://br.rafaeltuelho.model.Customer?consumer.namedQuery=Customer.findAll&consumer.delay=30000&consumeDelete=true"
Reply | Threaded
Open this post in threaded view
|

Re: Camel JPA Thread Hung

Gnana
In reply to this post by Claus Ibsen-2
SimpleRegistry registry = new SimpleRegistry();
registry.put("datasource",myDataSourceObj);
CamelContext context = new DefaultCamelContext(registry);
context.addRoutes(new myRouteBuilder());

from URI= "uri="jpa://br.rafaeltuelho.model.Customer?consumer.namedQuery=Customer.findAll&consumer.delay=30000&consumeDelete=true"