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

  1. Prepare the recommended project file structure or download the template files:

  2. Determine the type of the database store. Supported dialects are Oracle and MySQL.

  3. 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

       

  4. Add Maven dependencies to pom.xml – for database drivers, SQL component etc.

    Maven dependencies

     

  5. 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

       

  6. 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