Versions Compared

Key

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

...

There is used IoC container by Spring framework for CleverBus routes OpenHub framework routes configuration and initialization. Therefore it's not problem to use everything what Spring framework offers in this area (for example auto-wiring). Nevertheless, it's very useful to initialize or activate only those routes which there are necessary for unit tests and then it's good practice to leave dependency management on Apache Camel. In other words solve dependencies on the fly, not during application initialization as auto-wiring. 

Camel uses registry abstraction for dependency management and most often implementation is Spring framework.

More information: http://camel.apache.org/how-does-camel-look-up-beans-and-endpoints.htmlHow does Camel look up beans, components or endpoints?

Error codes for external calls

It's good practice to define error code, that extends org.cleverbusopenhubframework.openhub.core.common.exceptions.ErrorExtEnum interface, for each external call failure and this error code propagates to source system. 

...

  • use interfaces to solve dependency between common and specific code - common code defines interface and specific code implements it.
  • module dependency
    • use converters and use .convertBodyTo(class) in route implementation
    • place converters to IN modules because there should be no dependency to IN module in OUT modulemodule 

 

Interface versioning

If there is any public API (e.g. WSDL for Web Services) then it's necessary to handle backward compatibility of this interface.

Backward compatible changes:

  • adding new operation
  • adding new (XML) type to schema

Non-backward compatible changes:

  • removing operation
  • renaming operation
  • changes in (XML) types or message attributes
  • changes in namespace

Versioning

Status
colourRed
titleSTATUS

Use versions in format <major>.<minor>

Minor version is for compatible changes, major version indicates non-compatible changes.

Versioning should be explicit - it means to present version number in elements, URLs etc.:

If there is change in WSDL's version then change versions of XSDs as well.