This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 344f875 Fixed the code format of sql-component 344f875 is described below commit 344f8750eeadbfa1ff5cfd8e68a7acc5aac557ae Author: Willem Jiang <jiangni...@huawei.com> AuthorDate: Sun May 13 19:59:42 2018 +0800 Fixed the code format of sql-component --- .../camel-sql/src/main/docs/sql-component.adoc | 104 +++++++++++++-------- .../src/main/docs/sql-stored-component.adoc | 4 +- docs/user-manual/en/spring.adoc | 14 +-- 3 files changed, 75 insertions(+), 47 deletions(-) diff --git a/components/camel-sql/src/main/docs/sql-component.adoc b/components/camel-sql/src/main/docs/sql-component.adoc index acc55c2..1846821 100644 --- a/components/camel-sql/src/main/docs/sql-component.adoc +++ b/components/camel-sql/src/main/docs/sql-component.adoc @@ -594,10 +594,16 @@ Here is the SQL query used to create the tables, just replace [source,sql] ------------------------------------------------------------------------------- -CREATE TABLE aggregation ( id varchar(255) NOT NULL, exchange blob NOT -NULL, constraint aggregation_pk PRIMARY KEY (id) ); CREATE TABLE -aggregation_completed ( id varchar(255) NOT NULL, exchange blob NOT -NULL, constraint aggregation_completed_pk PRIMARY KEY (id) ); +CREATE TABLE aggregation ( + id varchar(255) NOT NULL, + exchange blob NOT NULL, + constraint aggregation_pk PRIMARY KEY (id) +); +CREATE TABLE aggregation_completed ( + id varchar(255) NOT NULL, + exchange blob NOT NULL, + constraint aggregation_completed_pk PRIMARY KEY (id) +); ------------------------------------------------------------------------------- @@ -612,13 +618,22 @@ store the body, and the following two headers `companyName` and [source,sql] ------------------------------------------------------------------------------- -CREATE TABLE aggregationRepo3 ( id varchar(255) NOT NULL, exchange blob -NOT NULL, body varchar(1000), companyName varchar(1000), accountName -varchar(1000), constraint aggregationRepo3_pk PRIMARY KEY (id) ); CREATE -TABLE aggregationRepo3_completed ( id varchar(255) NOT NULL, exchange -blob NOT NULL, body varchar(1000), companyName varchar(1000), -accountName varchar(1000), constraint aggregationRepo3_completed_pk -PRIMARY KEY (id) ); +CREATE TABLE aggregationRepo3 ( + id varchar(255) NOT NULL, + exchange blob NOT NULL, + body varchar(1000), + companyName varchar(1000), + accountName varchar(1000), + constraint aggregationRepo3_pk PRIMARY KEY (id) +); +CREATE TABLE aggregationRepo3_completed ( + id varchar(255) NOT NULL, + exchange blob NOT NULL, + body varchar(1000), + companyName varchar(1000), + accountName varchar(1000), + constraint aggregationRepo3_completed_pk PRIMARY KEY (id) +); ------------------------------------------------------------------------------- @@ -628,14 +643,19 @@ below: [source,xml] ------------------------------------------------------------------------------- <bean id="repo3" -class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"> -<property name="repositoryName" value="aggregationRepo3"/> <property -name="transactionManager" ref="txManager3"/> <property name="dataSource" -ref="dataSource3"/> <!-- configure to store the message body and -following headers as text in the repo --> <property -name="storeBodyAsText" value="true"/> <property -name="headersToStoreAsText"> <list> <value>companyName</value> -<value>accountName</value> </list> </property> </bean> + class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"> + <property name="repositoryName" value="aggregationRepo3"/> + <property name="transactionManager" ref="txManager3"/> + <property name="dataSource" ref="dataSource3"/> + <!-- configure to store the message body and following headers as text in the repo --> + <property name="storeBodyAsText" value="true"/> + <property name="headersToStoreAsText"> + <list> + <value>companyName</value> + <value>accountName</value> + </list> + </property> +</bean> ------------------------------------------------------------------------------- Codec (Serialization) @@ -676,17 +696,19 @@ Here is the declaration for Oracle: [source,xml] ------------------------------------------------------------------------------- -<bean id="lobHandler" -class="org.springframework.jdbc.support.lob.OracleLobHandler"> <property -name="nativeJdbcExtractor" ref="nativeJdbcExtractor"/> </bean> <bean -id="nativeJdbcExtractor" -class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"/> +<bean id="lobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler"> + <property name="nativeJdbcExtractor" ref="nativeJdbcExtractor"/> +</bean> +<bean id="nativeJdbcExtractor" + class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"/> <bean id="repo" -class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"> -<property name="transactionManager" ref="transactionManager"/> <property -name="repositoryName" value="aggregation"/> <property name="dataSource" -ref="dataSource"/> <!-- Only with Oracle, else use default --> <property -name="lobHandler" ref="lobHandler"/> </bean> + class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"> + <property name="transactionManager" ref="transactionManager"/> + <property name="repositoryName" value="aggregation"/> + <property name="dataSource" ref="dataSource"/> + <!-- Only with Oracle, else use default --> + <property name="lobHandler" ref="lobHandler"/> +</bean> ------------------------------------------------------------------------------- Optimistic locking @@ -729,16 +751,20 @@ JDBC vendor. ------------------------------------------------------------------------------- <bean id="repo" class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"> -<property name="transactionManager" ref="transactionManager"/> <property -name="repositoryName" value="aggregation"/> <property name="dataSource" -ref="dataSource"/> <property name"jdbcOptimisticLockingExceptionMapper" -ref="myExceptionMapper"/> </bean> <!-- use the default mapper with extra -FQN class names from our JDBC driver --> <bean id="myExceptionMapper" -class="org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper"> -<property name="classNames"> <util:set> -<value>com.foo.sql.MyViolationExceptoion</value> -<value>com.foo.sql.MyOtherViolationExceptoion</value> </util:set> -</property> </bean> + <property name="transactionManager" ref="transactionManager"/> + <propertyname="repositoryName" value="aggregation"/> + <property name="dataSource" ref="dataSource"/> + <property name"jdbcOptimisticLockingExceptionMapper" ref="myExceptionMapper"/> +</bean> +<!-- use the default mapper with extraFQN class names from our JDBC driver --> +<bean id="myExceptionMapper" class="org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper"> + <property name="classNames"> + <util:set> + <value>com.foo.sql.MyViolationExceptoion</value> + <value>com.foo.sql.MyOtherViolationExceptoion</value> + </util:set> + </property> +</bean> ------------------------------------------------------------------------------- ### Camel Sql Starter diff --git a/components/camel-sql/src/main/docs/sql-stored-component.adoc b/components/camel-sql/src/main/docs/sql-stored-component.adoc index 6b5b2f4..5469990 100644 --- a/components/camel-sql/src/main/docs/sql-stored-component.adoc +++ b/components/camel-sql/src/main/docs/sql-stored-component.adoc @@ -5,7 +5,7 @@ The *sql-stored:* component allows you to work with databases using JDBC Stored Procedure queries. This component is an extension to -the <<sql-component,SQL Component>> but specialized for calling +the link:sql-component.adoc[SQL Component] but specialized for calling stored procedures. This component uses `spring-jdbc` behind the scenes for the actual SQL @@ -251,4 +251,4 @@ You should also include the specific database driver, if needed. === See Also -* <<sql-component,SQL Component>> +* link:sql-component.adoc[SQL Component] diff --git a/docs/user-manual/en/spring.adoc b/docs/user-manual/en/spring.adoc index bb10b6a..6fa7f04 100644 --- a/docs/user-manual/en/spring.adoc +++ b/docs/user-manual/en/spring.adoc @@ -293,9 +293,11 @@ Integration Testing To avoid a hung route when testing using Spring Transactions see the note about Spring Integration Testing under Transactional Client. See also -Spring JMS Tutorial -Creating a new Spring based Camel Route -Spring example -Xml Reference -Advanced configuration of CamelContext using Spring -How Do I Import Routes From Other XML Files? +~~~~~~~~ + +* Spring JMS Tutorial +* Creating a new Spring based Camel Route +* Spring example +* Xml Reference +* Advanced configuration of CamelContext using Spring +* How Do I Import Routes From Other XML Files? -- To stop receiving notification emails like this one, please contact ningji...@apache.org.