Hi Claus,
You were right. The Hibernate session was not being kept open, but the
problem had to do with the lack of a valid camel policy in the route. The
policy as defined in my post actually pointed to a TransactionTemplate
instead of a TransactionPolicy. Once I corrected this issue, the
transaction manager for Hibernate worked correctly.
<!-- camel policy we refer to in our route -->
<bean id="required"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
<property name="template" ref="PROPAGATION_REQUIRED"/>
</bean>
<!-- the standard spring transaction template for required -->
<bean id="PROPAGATION_REQUIRED"
class="org.springframework.transaction.support.TransactionTemplate">
<property name="transactionManager" ref="transactionManager"/>
</bean>
However, I have now run into another issue. I lose the headers in my route
if I add a bean component into my route. With the 1 bean commented out, the
route works and the headers remain throughout the route. If I uncomment,
the bean below the headers are lost before it gets to the processor. Any
ideas?
<camel:when>
<camel:groovy>exchange.in.headers.operationName ==
'find'</camel:groovy>
<camel:to uri="bean:classBSO?methodName=find" />
<!--
<camel:bean ref="classLatestRevision" method="transform"/>
-->
<camel:process ref="classListProcessor" />
</camel:when>
Regards,
Marc
--
View this message in context:
http://www.nabble.com/Camel-TOE-tp20540912s22882p20710052.html
Sent from the Camel - Users mailing list archive at Nabble.com.