There are the following steps to start new project with OpenHub framework
Create Maven structure
Create new Maven project with reference to parent artifact of OpenHub framework:
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)
Start implementing routes
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.
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.