There are the following steps to start new project with OpenHub framework
There is reference project to see details about implementation new projects based on OpenHub framework.
Create Maven structure
Create new Maven project with reference to parent artifact of OpenHub framework:
To have OpenHub as parent pom does setup entire library stack & maven plugins.
Possible limitations or caveats of this approach:
OHFJIRA-99Getting issue details...
We recommend to create at least two modules:
- project - module for project specific routes and business logic
- war - module that builds this project and OpenHub framework together
Project module depends on the following OpenHub framework modules:
- openhub-core-api: defines interfaces for new routes implementation
- openhub-test (test): base classes for unit tests
- openhub-components (test): contains implementation of OpenHub components, only necessary when components are used
- openhub-core (test): module with core functionality, implements API and SPI interfaces
War module depends on previous project module and the following OpenHub framework modules:
- openhub-web: configures all together, defines OpenHub as web application
- admin-console: Admin GUI (optional)
Try ping service at url /http/ping if OpenHub is running successfully.
Start implementing routes
There are several How to articles for beginners:
OpenHub frameworks offers effective way how to create routes based on experience from several years of implementation integration projects. Nevertheless it's up to you which approach do you use, if you use OpenHub's functionality or directly Apache Camel.
Our recommendation is to use best from both - use OpenHub framework as base (defines project structure, application stack, offers lot of useful functionality for future use, ...) together with any Camel's functionality you need, also with third-party tools which works with Apache Camel.
OpenHub framework initiates database by Flyway, PostgreSQL and H2 are supported by default.
Projects are responsible to define dependencies for specific databases such as JDBC drivers.
There is one alternative way how to implement new integration routes - you can use Dynamic extension loading functionality even if you don't implement extensions directly, you can use extension/external library concept for initialization.
This approach has advantage that you can create self-contained and reusable JAR libraries with functionality that it's possible to share between more projects. Also you don't have to create new project, you can use OpenHub framework as-is and add external libraries via configuration only.