camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Green <james.mk.gr...@gmail.com>
Subject Re: Camel + Spring + JpaTransactionManager = Hung on SELECT
Date Fri, 05 Sep 2014 16:40:10 GMT
Supporting log:

17:34:09,347 DEBUG
org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler:232
invoke() - Creating new EntityManager for shared EntityManager invocation
17:34:09,347 DEBUG org.hibernate.impl.SessionImpl:265 <init>() - opened
session at timestamp: 14099348493
17:34:09,367 DEBUG org.hibernate.jdbc.AbstractBatcher:410
logOpenPreparedStatement() - about to open PreparedStatement (open
PreparedStatements: 0, globally: 0)
17:34:09,367 DEBUG org.hibernate.jdbc.ConnectionManager:444
openConnection() - opening JDBC connection
17:34:09,367 DEBUG org.hibernate.jdbc.util.SQLStatementLogger:111
logStatement() - select messagesta0_.ID as ID8_, messagesta0_.address as
address8_, messagesta0_.alerttag as alerttag8_, messagesta0_.alerttype as
alerttype8_, messagesta0_.clientid as clientid8_,
messagesta0_.deliverdatetime as deliverd6_8_, messagesta0_.delivery_found
as delivery7_8_, messagesta0_.delivery_method as delivery8_8_,
messagesta0_.insertdatetime as insertda9_8_, messagesta0_.lastmod as
lastmod8_, messagesta0_.processed as processed8_, messagesta0_.reason as
reason8_, messagesta0_.remoteid as remoteid8_, messagesta0_.status as
status8_, messagesta0_.userid as userid8_ from messagestatus messagesta0_
where messagesta0_.remoteid=?
Hibernate: select messagesta0_.ID as ID8_, messagesta0_.address as
address8_, messagesta0_.alerttag as alerttag8_, messagesta0_.alerttype as
alerttype8_, messagesta0_.clientid as clientid8_,
messagesta0_.deliverdatetime as deliverd6_8_, messagesta0_.delivery_found
as delivery7_8_, messagesta0_.delivery_method as delivery8_8_,
messagesta0_.insertdatetime as insertda9_8_, messagesta0_.lastmod as
lastmod8_, messagesta0_.processed as processed8_, messagesta0_.reason as
reason8_, messagesta0_.remoteid as remoteid8_, messagesta0_.status as
status8_, messagesta0_.userid as userid8_ from messagestatus messagesta0_
where messagesta0_.remoteid=?
17:34:29,357 DEBUG org.apache.camel.support.DefaultTimeoutMap:187 purge() -
Evicting inactive entry ID: Camel-ID-NIGELTEMP-51929-1409934847866-0-2
(times out after 20000 millis)

At this point we've waited 20 seconds and camel has given up waiting. As
previously noted this is an in-memory db with a single record.



On 5 September 2014 17:08, James Green <james.mk.green@gmail.com> wrote:

> We have a maven project that bundles Camel and Spring. The trouble is a
> processor receives a message and uses an EntityManager to perform a
> database query which hangs completely until a 20s timeout kicks in during
> routing.
>
> The hang is during an integration test against an in-memory database with
> a single record. We can do the same query within the test itself within a
> few milliseconds before calling the camel code which hangs.
>
> We also built a separate integration test that executes the processor
> directly (without Camel) and this works fine. So it's only when Camel is
> used does the route hang. Debugging switched on, we see HIbernate log the
> SELECT query, then nothing before the Camel timeout gets logged.
>
> Unfortunately at this point we're totally baffled. Any ideas gratefully
> received.
>
> Versions:
> Camel: 2.13.2
> Spring: 3.2.10-RELEASE
> Spring-data-jpa: 1.6.2
> spring-osgi-core: 1.0.2
> Hibernate: 3.6.10
> hibernate-jpa-2.0-api 1.0.1-FINAL
>
> James
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message