xBus

Base Functions

There are some fundamental functions which do not belong to one of the three layers, but support the modules in all layers.

 Configuration

One major feature of the xBus is its flexibility. Its behavior can be configured very easy according to the specific needs. This means that the necessary adaptations can be carried out without changing the source code of the xBus. Instead, all parameters are set in configuration files and can be easily modified.

The page Configuration describes, which configuration files exist, how their syntax looks like and most important gives a complete explanation of all possible entries.

 Journaling

Journaling is used to monitor the data flow during production. The journal writes information for every receive or send action. This is especially helpful to solve problems, if data is missing in a system or to create statistics.

For each action the following information is written into the Journal:

  • Type of action: Receive or Send
  • Id of the message. The id is generated when receiving the message and stays constant for following actions. Thus, it is extremely useful to track the flow of one specific message through all systems.
  • Name of the system, including additional address information
  • Data of request
  • Timestamp when the action has started
  • Data of response
  • Timestamp when the transfer has ended
  • Return code: OK or NOK
  • Error message when return code is NOK

Currently, two output formats are supported:

  • Journaling into the database is very convenient for further processing. The drawback is the higher demand on the infrastructure, since a database server must be available. All databases are supported, for which a JDBC driver is available.
  • Journaling into a file needs less resources, but its far more difficult to query for information in a file. The columns are separated by "|" chars. This helps when importing the file in a spreadsheet or a database . For better maintainability, a new file is created for every day.

To save resources, the amount of data can be reduced by specifying which actions should be written or ignored and how much of the request and response data should be stored in the journal. The related configuration and many other options of the journal can be found in Configuration -> Base -> Journal.

 Tracing

Another way of controlling the behavior of the xBus during runtime is tracing. But while the journaling is used to track the data flows, the tracing is usually used by developers and to get more informations when a problem has occurred.

Several features can be configured (cf. Configuration -> Base) The two most important are:

  • Five trace level are available: Debug, Info, Warning, Error, Always. The trace level controls the verbosity of the trace. Debug leads to extensive messages, while when using Always only a few are created. For production Error is a good choice; information on all critical errors is traced. This avoids a time consuming overhead.
  • The medium where the trace will be written. Currently, tracing on the console and into a file are supported.
Trace files can get quite big. The xBus TraceFileRenamer checks for the trace file size and renames the file by adding a time stamp, if the file size exceeds a configured limit. A script for starting it is provided.

 Transaction Handling

Transaction handling is described sufficiently in Overview -> Concepts.

 Error Handling

Error handling is described sufficiently in Operation -> Error Handling.

 Message Handling

Message Handling has the task to get messages from a properties file.