INT-4050: Refactoring for JDBC Schema Scripts
JIRA: https://jira.spring.io/browse/INT-2625, https://jira.spring.io/browse/INT-4050, https://jira.spring.io/browse/INT-4052 Make some refactoring for consistency: - Move `JdbcMessageStore` to the `store` package - Make `JdbcMessageStore` only ctor-based configuration for the `JdbcOperations` - Remove `/channel/` SQL scripts in favor of combined in the `/jdbc/` directory - Make scripts for the `INT_CHANNEL_MESSAGE` table and indexes generated via VPP Fix drop script generation Fix `schema-derby.sql` for suspicious `[]` Looks like `foundrylogic.vpp` tool generates somehow wrong SQL Further fix for the `drop` scripts generation Address PR comments: * Remove deprecated code in the `JdbcMessageStore` * Remove separate MySQL script in favor of only one for latest version * Remove the note in the `jdbc.adoc` about recommendation to use new MySQL version
This commit is contained in:
committed by
Gary Russell
parent
34db64c832
commit
5224779a04
@@ -334,7 +334,7 @@ Below you can see an example of an aggregator.
|
||||
|
||||
<int:channel id="throwAwayChannel"/>
|
||||
|
||||
<bean id="persistentMessageStore" class="org.springframework.integration.jdbc.JdbcMessageStore">
|
||||
<bean id="persistentMessageStore" class="org.springframework.integration.jdbc.store.JdbcMessageStore">
|
||||
<constructor-arg ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -323,23 +323,6 @@ Here we have specified a `LobHandler` for dealing with messages as large objects
|
||||
often necessary if using Oracle) and a prefix for the table names in the queries generated by the store.
|
||||
The table name prefix defaults to `INT_`.
|
||||
|
||||
[NOTE]
|
||||
=====
|
||||
If you plan on using *MySQL*, please use MySQL version _5.6.4_ or higher, if possible.
|
||||
Prior versions do not support _fractional seconds_ for temporal data types.
|
||||
Because of that, messages may not arrive in the precise FIFO order when polling from such a MySQL Message Store.
|
||||
|
||||
Therefore, starting with _Spring Integration 3.0_, we provide an additional set of DDL scripts for MySQL version _5.6.4_ or higher:
|
||||
|
||||
* schema-drop-mysql-5_6_4.sql
|
||||
* schema-mysql-5_6_4.sql
|
||||
|
||||
For more information, please see: https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html[Fractional Seconds in Time Values].
|
||||
|
||||
Also important, please ensure that you use an up-to-date version of the JDBC driver for MySQL (Connector/J), e.g.
|
||||
version _5.1.24_ or higher.
|
||||
=====
|
||||
|
||||
[[jdbc-message-store-channels]]
|
||||
==== Backing Message Channels
|
||||
|
||||
@@ -358,7 +341,9 @@ This `channelMessageStoreQueryProvider` provides the SQL queries and Spring Inte
|
||||
* Oracle
|
||||
* Derby
|
||||
* H2
|
||||
|
||||
* SqlServer
|
||||
* Sybase
|
||||
* DB2
|
||||
|
||||
If your database is not listed, you can easily extend the `AbstractChannelMessageStoreQueryProvider` class and provide your own custom queries.
|
||||
|
||||
@@ -390,7 +375,6 @@ To achieve better JDBC queue throughput, and avoid issues when different threads
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
…
|
||||
<bean id="queryProvider"
|
||||
class="o.s.i.jdbc.store.channel.PostgresChannelMessageStoreQueryProvider"/>
|
||||
|
||||
@@ -422,7 +406,6 @@ To achieve better JDBC queue throughput, and avoid issues when different threads
|
||||
</int:bridge>
|
||||
|
||||
<int:channel id="outputChannel" />
|
||||
…
|
||||
----
|
||||
|
||||
*Priority Channel*
|
||||
@@ -460,11 +443,10 @@ To configure that scenario, simply extend one message store bean from the other:
|
||||
==== Initializing the Database
|
||||
|
||||
Spring Integration ships with some sample scripts that can be used to initialize a database.
|
||||
In the spring-integration-jdbc JAR file you will find scripts in the `org.springframework.integration.jdbc` and in the `org.springframework.integration.jdbc.store.channel` package: there is a create and a drop script example for a range of common database platforms.
|
||||
In the `spring-integration-jdbc` JAR file you can find scripts in the `org.springframework.integration.jdbc` package: there is a create and a drop script example for a range of common database platforms.
|
||||
A common way to use these scripts is to reference them in a https://docs.spring.io/spring/docs/current/spring-framework-reference/html/jdbc.html#jdbc-intializing-datasource[Spring JDBC data source initializer].
|
||||
Note that the scripts are provided as samples or specifications of the the required table and column names.
|
||||
You may find that you need to enhance them for production use (e.g.
|
||||
with index declarations).
|
||||
`Note that the scripts are provided as samples or specifications of the the required table and column names.
|
||||
You may find that you need to enhance them for production use (e.g. with index declarations).
|
||||
|
||||
==== Partitioning a Message Store
|
||||
|
||||
|
||||
Reference in New Issue
Block a user