Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aggregate-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
<artifactId>camel-sql</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby-version}</version>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2-version}</version>
</dependency>

<!-- logging -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public final class Application {
private static final int END = 100;

private static final String CID_HEADER = "corrId";
private static final String DB_URL = "jdbc:derby:target/testdb;create=true";
private static final String DB_URL = "jdbc:h2:file:./target/testdb";
private static final String DB_USER = "admin";
private static final String DB_PASS = "admin";

Expand Down Expand Up @@ -153,7 +153,7 @@ private static AggregationRepository getAggregationRepository() {
+ "version bigint not null"
+ ")");
} catch (SQLException e) {
if (!e.getMessage().contains("already exists")) {
if (!e.getMessage().toLowerCase().contains("already exist")) {
LOG.error("Database initialization failure", e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion jdbc/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
=== Introduction

This example shows how to use camel-jdbc component with an embedded
Apache Derby database.
H2 database.

=== Build

Expand Down
12 changes: 4 additions & 8 deletions jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<properties>
<category>Database</category>
<title>JDBC</title>
<h2-version>2.2.224</h2-version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -77,14 +78,9 @@

<!-- jdbc -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<version>${derby-version}</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby-version}</version>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2-version}</version>
</dependency>

<!-- logging -->
Expand Down
4 changes: 2 additions & 2 deletions jdbc/src/main/resources/META-INF/spring/camel-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<!--
Embedded in-memory database setup.
-->
<jdbc:embedded-database id="dataSource" type="DERBY">
<jdbc:script location="classpath:create-derby.sql"/>
<jdbc:embedded-database id="dataSource" type="H2">
<jdbc:script location="classpath:create-h2.sql"/>
</jdbc:embedded-database>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
/*
STATUS : 'NEW', 'DONE'
*/
CREATE TABLE CAMEL_TEST (
ID BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
CREATE TABLE CAMEL_TEST (
ID BIGINT AUTO_INCREMENT,
MSG VARCHAR(10240),
STATUS CHAR(4) DEFAULT 'NEW',
CREATE_TS TIMESTAMP DEFAULT CURRENT_TIMESTAMP
Expand Down