Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you want to start to implement new integration project (implement new routes) then you have the following options:

1) implement new routes in separate project and use it

...

with OpenHub framework

This approach supposes to use CleverBus OpenHub framework admin GUI as is (without any additional changes) with adding dependencies to external projects/libraries with route implementations. This approach is very similar how works OpenHub framework extensions, specifically look at How to implement new extensions.

Warning

There is one big difference between extensions and adding Project routes to CleverBus OpenHub - extensions are initialized in own Spring child context but when you add external project routes then you use same Spring context like other routes implemented directly in CleverBusOpenHub framework.

 

This approach has several steps:

  • create separated project for route implementations with dependency to CleverBus API OpenHub framework API (core-api module
  • add dependency to project's artefact (JAR file is expected) 
  • adjust Spring configuration to initialize Project routes (all in web-admin module)
    • add Spring XML configuration file (/src/main/webapp/WEB-INF/spring-ws-servlet.xml)
    • add property files (/src/main/webapp/WEB-INF/spring-ws-servlet.xml)
    • extend Spring auto-scaning

Tip

You can use Dynamic extension loading functionality even if you don't implement extensions, you can use extension/external library concept for initialization.

Use extensions.cfg (or extensions0.cfg) and add parameter for external library.

This approach has advantage that it's not necessary to make changes in CleverBus OpenHub framework at all (only set extension properties)

2) create new project from

...

OpenHub framework web-admin

CleverBus OpenHub framework web-admin module contains admin GUI and all necessary configurations for runnable and deployable CleverBus web OpenHub web application.

Create new (Maven) project with the following module structure:

  • project routes implementation (analogy to examples module, see Maven and Spring)
  • web admin with dependency to previous module with routes. This module is analogy to web-admin module in CleverBusOpenHub framework

The most simple approach is to copy web-admin module from CleverBus and OpenHub framework and adjusts it for new project. There are the following steps to do:

  • change Maven dependencies (pom.xml)
  • change package names for auto-scanning of route implementations (/src/main/webapp/WEB-INF/spring-ws-servlet.xml)
  • if needed change security settings (/src/main/webapp/WEB-INF/rootSecurity.xml)

 

Tip

If you want to customize web admin (add new content or change look-at-feel or whatever else) then there are two ways how to do it:

  • use or copy/duplicate default Admin GUI from CleverBus OpenHub framework to your project and make changes. This approach has one big disadvantage that it will be tricky to upgrade Admin GUI to newer versions.
  • second possibility is to leave Admin GUI as is (without changes) and create new web content in separated web context or web application. In other words decouple Admin GUI content from your web content.

...

Info

If you use different database to default H2 DB then you must initialize database structure with SQL scripts for specific target databases, e.g. /db/db_schema_postgreSql.sql (core module) for PostgreSQL.

3) use Maven archetype

Use Maven archetypes for creating new project based on CleverBusOpenHub framework. Maven archetype is implemented in web-admin-archetype.

Build customized project from archetype cleverbusopenhub-web-admin-archetype it is possible by command:

mvn archetype:generate
   -DarchetypeCatalog=(local|remote)
   -DarchetypeGroupId=org.cleverbusopenhubframework.openhub
   -DarchetypeArtifactId=cleverbusopenhub-web-admin-archetype
   -DarchetypeVersion=<version>
   -DcleverBusVersion=<version>
   -DcleverBusServerName=ESB
   -DcleverBusServerDescription="Enterprise Service Bus"

...