...
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
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 | ||||
---|---|---|---|---|
|
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.:
- add major and minor version to WSDL name: MyService-v1.2.wsdl
- add major version to targetNamespace of WSDL: <definition targetNamespace="http://cleverbss.org/ws/MyService-v1" xmlns="http://schemas.xmlsoap.org/wsdl/">
- add major and minor version to portType element: <portType name="MyServicePort-v1.2">
- add major and minor version to service element: <service name="MyService-v1.2">
- add major and minor version to endpoint: <soap:address location="http:// cleverbss.org/myService/v1"/>
If there is change in WSDL's version then change versions of XSDs as well.