Configure Database Connection
Before using the database storage within IntegrationManager, you need to configure the database connection – JDBC Data Source – and also configure the Camel SQL component to use the JDBC Data Source.
Step by Step
Prepare the recommended project file structure or download the template files:
Determine the type of the database store. Supported dialects are Oracle and MySQL.
Obtain the connection information for the database storage. This information should be given to you by a project coordinator or Operations staff who are responsible for infrastructure. Store this connection information in the application*.property file.Â
Example how to store MySQL connection information in application.properties:
Connection configuration
mysql.url=jdbc:mysql://127.0.0.1:3306/testDb mysql.username=USERNAME mysql.password=PASSWORD
Â
Example how to store Oracle connection information in application.properties:
Connection configuration
oracle.url=jdbc:oracle:thin:@SERVER:PORT/SERVICE_NAME oracle.username=USERNAME oracle.password=PASSWORD
Â
Example how to store Snowflake connection information in application.properties:
Snowflake connection configuration
snowflake.url=jdbc:snowflake://<accountId>.snowflakecomputing.com/ snowflake.username=USERNAME snowflake.password=PASSWORD snowflake.database=DEMO_DB snowflake.schema=PUBLIC
Â
Add Maven dependencies to pom.xml – for database drivers, SQL component etc.
Maven dependencies
Â
Define and configure the JDBC Data Source bean in the camel-context.xml file.Â
Oracle JDBC Data Source
Â
MySQL JDBC Data Source
Â
Snowflake Data Source
Â
Define and configure the Camel SQL component to use the JDBC Data Source in the camel-context.xml file.
Camel SQL component
IntegrationManager version 5.8.0