camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r846796 - in /websites/production/camel/content: book-component-appendix.html jpa.html
Date Wed, 16 Jan 2013 07:26:15 GMT
Author: buildbot
Date: Wed Jan 16 07:26:14 2013
New Revision: 846796

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/jpa.html

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Wed Jan 16 07:26:14 2013
@@ -9710,7 +9710,7 @@ jpa:[entityClassName][?options]
 
 <h3><a shape="rect" name="BookComponentAppendix-Options"></a>Options</h3>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh">
Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description
</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>entityType</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <em>entityClassName</em>
</td><td colspan="1" rowspan="1" class="confluenceTd"> Overrides the <em>entityClassName</em>
from the URI. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>persistenceUnit</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>camel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
The JPA persistence unit used by default. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumeDelete</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer o
 nly:</b> If <tt>true</tt>, the entity is deleted after it is consumed;
if <tt>false</tt>, the entity is not deleted. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumeLockEntity</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Specifies
whether or not to set an exclusive lock on each entity bean while processing the results from
polling. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>flushOnSend</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA producer only:</b> Flushes the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html" rel="nofollow">EntityManager</a>
after the entity bean has been persisted. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>maximumR
 esults</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd">  <b>JPA consumer
only:</b> Set the maximum number of results to retrieve on the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html" rel="nofollow">Query</a>.
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> This option is <a shape="rect"
href="registry.html" title="Registry">Registry</a> based which requires the <tt>#</tt>
notation so that the given <tt>transactionManager</tt> being specified can be
looked up properly, e.g. <tt>transactionManager=#myTransactionManager</tt>. It
specifies the transaction manager to use. If none provided, Camel will use a <tt>JpaTransactionManager</tt>
by default. Can be used to set a JTA t
 ransaction manager (for integration with an EJB container). </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.delay</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>500</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Delay
in milliseconds between each poll. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Milliseconds before
polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA consumer only:</b> Set to <tt>true</tt> to use fixed delay
between polls, otherwise fixed rate is used. See <a shape="rect" class="external-li
 nk" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for details. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> An
integer value to define the maximum number of messages to gather per poll. By default, no
maximum is set. Can be used to avoid polling many thousands of messages when starting up the
server. Set a value of 0 or negative to disable. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.query</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom query when
consuming data. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.
 namedQuery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> To
use a named query when consuming data. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.nativeQuery</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom native query
when consuming data. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.resultClass</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7: JPA consumer only:</b>
Defines the type of the returned payload (we will call <tt>entityManager.createNativeQuery(nativeQuery,
resultClass)</tt> instead of <tt>entityManager.createNativeQuery(nativeQuery)</tt>).
Without this option, we will return an object array. Only has an affec
 t when using in conjunction with native query when consuming data. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.transacted</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7.5/2.8.3/2.9:
JPA consumer only:</b> Whether to run the consumer in transacted mode, by which all
messages will either commit or rollback, when the entire batch has been processed. The default
behavior (false) is to commit all the previously successfully processed messages, and only
rollback the last failed message. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>usePersist</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>Camel 2.5: JPA producer only:</b> Indicates to use
<tt>entityManager.persist(entity)</tt> instead of <tt>entityManager.merge(entity)</tt>.
Note: <tt>entityManager
 .persist(entity)</tt> doesn't work for detached entities (where the EntityManager has
to execute an UPDATE instead of an INSERT query)! </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh">
Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description
</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>entityType</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <em>entityClassName</em>
</td><td colspan="1" rowspan="1" class="confluenceTd"> Overrides the <em>entityClassName</em>
from the URI. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>persistenceUnit</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>camel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
The JPA persistence unit used by default. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumeDelete</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer o
 nly:</b> If <tt>true</tt>, the entity is deleted after it is consumed;
if <tt>false</tt>, the entity is not deleted. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumeLockEntity</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Specifies
whether or not to set an exclusive lock on each entity bean while processing the results from
polling. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>flushOnSend</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA producer only:</b> Flushes the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html" rel="nofollow">EntityManager</a>
after the entity bean has been persisted. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>maximumR
 esults</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd">  <b>JPA consumer
only:</b> Set the maximum number of results to retrieve on the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html" rel="nofollow">Query</a>.
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> This option is <a shape="rect"
href="registry.html" title="Registry">Registry</a> based which requires the <tt>#</tt>
notation so that the given <tt>transactionManager</tt> being specified can be
looked up properly, e.g. <tt>transactionManager=#myTransactionManager</tt>. It
specifies the transaction manager to use. If none provided, Camel will use a <tt>JpaTransactionManager</tt>
by default. Can be used to set a JTA t
 ransaction manager (for integration with an EJB container). </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.delay</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>500</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Delay
in milliseconds between each poll. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Milliseconds before
polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA consumer only:</b> Set to <tt>true</tt> to use fixed delay
between polls, otherwise fixed rate is used. See <a shape="rect" class="external-li
 nk" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for details. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> An
integer value to define the maximum number of messages to gather per poll. By default, no
maximum is set. Can be used to avoid polling many thousands of messages when starting up the
server. Set a value of 0 or negative to disable. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.query</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom query when
consuming data. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.
 namedQuery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> To
use a named query when consuming data. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.nativeQuery</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom native query
when consuming data. You may want to use the option <tt>consumer.resultClass</tt>
also when using native queries. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>consumer.resultClass</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">
<b>Camel 2.7: JPA consumer only:</b> Defines the type of the returned payload
(we will call <tt>entityManager.createNativeQuery(nativeQuery, resultClass)</tt>
instead of <tt>entityManager.createNativeQue
 ry(nativeQuery)</tt>). Without this option, we will return an object array. Only has
an affect when using in conjunction with native query when consuming data. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.transacted</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7.5/2.8.3/2.9:
JPA consumer only:</b> Whether to run the consumer in transacted mode, by which all
messages will either commit or rollback, when the entire batch has been processed. The default
behavior (false) is to commit all the previously successfully processed messages, and only
rollback the last failed message. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>usePersist</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>Camel 2.5: JPA producer only:</b> Indicates to use
<tt>entityManager.
 persist(entity)</tt> instead of <tt>entityManager.merge(entity)</tt>. Note:
<tt>entityManager.persist(entity)</tt> doesn't work for detached entities (where
the EntityManager has to execute an UPDATE instead of an INSERT query)! </td></tr></tbody></table>
 </div>
 </div>
 
@@ -9857,8 +9857,9 @@ from(<span class="code-quote">"jpa:<span
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager
<span class="code-keyword">for</span> transaction; nested exception is &lt;openjpa-2.2.1-r422266:1396819
nonfatal user error&gt; org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not enhanced at build
time or at class load time with a javaagent: "
-org.apache.camel.examples.SendEmail".
+org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager
<span class="code-keyword">for</span> transaction; nested exception is
+&lt;openjpa-2.2.1-r422266:1396819 nonfatal user error&gt; org.apache.openjpa.persistence.ArgumentException:
This configuration disallows runtime optimization,
+but the following listed types were not enhanced at build time or at class load time with
a javaagent: <span class="code-quote">"org.apache.camel.examples.SendEmail"</span>.
 	at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:427)
 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
 	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)

Modified: websites/production/camel/content/jpa.html
==============================================================================
--- websites/production/camel/content/jpa.html (original)
+++ websites/production/camel/content/jpa.html Wed Jan 16 07:26:14 2013
@@ -121,7 +121,7 @@ jpa:[entityClassName][?options]
 
 <h3><a shape="rect" name="JPA-Options"></a>Options</h3>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh">
Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description
</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>entityType</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <em>entityClassName</em>
</td><td colspan="1" rowspan="1" class="confluenceTd"> Overrides the <em>entityClassName</em>
from the URI. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>persistenceUnit</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>camel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
The JPA persistence unit used by default. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumeDelete</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer o
 nly:</b> If <tt>true</tt>, the entity is deleted after it is consumed;
if <tt>false</tt>, the entity is not deleted. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumeLockEntity</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Specifies
whether or not to set an exclusive lock on each entity bean while processing the results from
polling. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>flushOnSend</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA producer only:</b> Flushes the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html" rel="nofollow">EntityManager</a>
after the entity bean has been persisted. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>maximumR
 esults</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd">  <b>JPA consumer
only:</b> Set the maximum number of results to retrieve on the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html" rel="nofollow">Query</a>.
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> This option is <a shape="rect"
href="registry.html" title="Registry">Registry</a> based which requires the <tt>#</tt>
notation so that the given <tt>transactionManager</tt> being specified can be
looked up properly, e.g. <tt>transactionManager=#myTransactionManager</tt>. It
specifies the transaction manager to use. If none provided, Camel will use a <tt>JpaTransactionManager</tt>
by default. Can be used to set a JTA t
 ransaction manager (for integration with an EJB container). </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.delay</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>500</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Delay
in milliseconds between each poll. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Milliseconds before
polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA consumer only:</b> Set to <tt>true</tt> to use fixed delay
between polls, otherwise fixed rate is used. See <a shape="rect" class="external-li
 nk" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for details. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> An
integer value to define the maximum number of messages to gather per poll. By default, no
maximum is set. Can be used to avoid polling many thousands of messages when starting up the
server. Set a value of 0 or negative to disable. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.query</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom query when
consuming data. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.
 namedQuery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> To
use a named query when consuming data. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.nativeQuery</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom native query
when consuming data. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.resultClass</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7: JPA consumer only:</b>
Defines the type of the returned payload (we will call <tt>entityManager.createNativeQuery(nativeQuery,
resultClass)</tt> instead of <tt>entityManager.createNativeQuery(nativeQuery)</tt>).
Without this option, we will return an object array. Only has an affec
 t when using in conjunction with native query when consuming data. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.transacted</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7.5/2.8.3/2.9:
JPA consumer only:</b> Whether to run the consumer in transacted mode, by which all
messages will either commit or rollback, when the entire batch has been processed. The default
behavior (false) is to commit all the previously successfully processed messages, and only
rollback the last failed message. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>usePersist</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>Camel 2.5: JPA producer only:</b> Indicates to use
<tt>entityManager.persist(entity)</tt> instead of <tt>entityManager.merge(entity)</tt>.
Note: <tt>entityManager
 .persist(entity)</tt> doesn't work for detached entities (where the EntityManager has
to execute an UPDATE instead of an INSERT query)! </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh">
Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description
</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>entityType</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <em>entityClassName</em>
</td><td colspan="1" rowspan="1" class="confluenceTd"> Overrides the <em>entityClassName</em>
from the URI. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>persistenceUnit</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>camel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
The JPA persistence unit used by default. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumeDelete</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer o
 nly:</b> If <tt>true</tt>, the entity is deleted after it is consumed;
if <tt>false</tt>, the entity is not deleted. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumeLockEntity</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Specifies
whether or not to set an exclusive lock on each entity bean while processing the results from
polling. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>flushOnSend</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA producer only:</b> Flushes the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html" rel="nofollow">EntityManager</a>
after the entity bean has been persisted. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>maximumR
 esults</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd">  <b>JPA consumer
only:</b> Set the maximum number of results to retrieve on the <a shape="rect" class="external-link"
href="http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html" rel="nofollow">Query</a>.
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transactionManager</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> This option is <a shape="rect"
href="registry.html" title="Registry">Registry</a> based which requires the <tt>#</tt>
notation so that the given <tt>transactionManager</tt> being specified can be
looked up properly, e.g. <tt>transactionManager=#myTransactionManager</tt>. It
specifies the transaction manager to use. If none provided, Camel will use a <tt>JpaTransactionManager</tt>
by default. Can be used to set a JTA t
 ransaction manager (for integration with an EJB container). </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.delay</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>500</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Delay
in milliseconds between each poll. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> Milliseconds before
polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
<b>JPA consumer only:</b> Set to <tt>true</tt> to use fixed delay
between polls, otherwise fixed rate is used. See <a shape="rect" class="external-li
 nk" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for details. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> An
integer value to define the maximum number of messages to gather per poll. By default, no
maximum is set. Can be used to avoid polling many thousands of messages when starting up the
server. Set a value of 0 or negative to disable. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.query</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom query when
consuming data. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<tt>consumer.
 namedQuery</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td
colspan="1" rowspan="1" class="confluenceTd"> <b>JPA consumer only:</b> To
use a named query when consuming data. </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <tt>consumer.nativeQuery</tt> </td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>JPA consumer only:</b> To use a custom native query
when consuming data. You may want to use the option <tt>consumer.resultClass</tt>
also when using native queries. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>consumer.resultClass</tt> </td><td colspan="1"
rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">
<b>Camel 2.7: JPA consumer only:</b> Defines the type of the returned payload
(we will call <tt>entityManager.createNativeQuery(nativeQuery, resultClass)</tt>
instead of <tt>entityManager.createNativeQue
 ry(nativeQuery)</tt>). Without this option, we will return an object array. Only has
an affect when using in conjunction with native query when consuming data. </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.transacted</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt>
</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.7.5/2.8.3/2.9:
JPA consumer only:</b> Whether to run the consumer in transacted mode, by which all
messages will either commit or rollback, when the entire batch has been processed. The default
behavior (false) is to commit all the previously successfully processed messages, and only
rollback the last failed message. </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>usePersist</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1"
class="confluenceTd"> <b>Camel 2.5: JPA producer only:</b> Indicates to use
<tt>entityManager.
 persist(entity)</tt> instead of <tt>entityManager.merge(entity)</tt>. Note:
<tt>entityManager.persist(entity)</tt> doesn't work for detached entities (where
the EntityManager has to execute an UPDATE instead of an INSERT query)! </td></tr></tbody></table>
 </div>
 </div>
 
@@ -268,8 +268,9 @@ from(<span class="code-quote">"jpa:<span
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager
<span class="code-keyword">for</span> transaction; nested exception is &lt;openjpa-2.2.1-r422266:1396819
nonfatal user error&gt; org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not enhanced at build
time or at class load time with a javaagent: "
-org.apache.camel.examples.SendEmail".
+org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager
<span class="code-keyword">for</span> transaction; nested exception is
+&lt;openjpa-2.2.1-r422266:1396819 nonfatal user error&gt; org.apache.openjpa.persistence.ArgumentException:
This configuration disallows runtime optimization,
+but the following listed types were not enhanced at build time or at class load time with
a javaagent: <span class="code-quote">"org.apache.camel.examples.SendEmail"</span>.
 	at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:427)
 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
 	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)



Mime
View raw message