Binding Configuration

Configuration

Currently there are two aspects you are able to configure when using TracEE:

  • Desired keys within the propagated invocation context
  • Length of the generated invocationId and sessionId

Filtering propagated context

If not configured otherwise, all TracEE connector modules gracefully accept incoming contexts, subsequently pass them down to sub-invocations and eventually post the resulting contexts back to the caller.

This behaviour may not always be desirable, especially when a context contains potentially sensitive information.

This is where TracEE configuration kicks in. It allows you to configure each connector with its own accepting- and passing-policy. These policies are called profiles. TracEE ships with a small set of standard profiles. They are encoded within java property files.

These preconfigured profiles are shipped with the tracee-core.

You may create new profiles within your application or overwrite values from the tracee.default.properties file. Just create a file with the name META-INF/tracee.properties in your application resource directory.

Configurable Values

Configuration key Description
.IncomingRequest Comma-separated list of regular expressions. Each parameter name matched by at least one of the expressions will be parsed from incoming requests to the context.
.OutgoingResponse Comma-separated list of regular expressions. Each parameter name matched by at least one of the expressions will be written back from the context to the outgoing response.
.OutgoingRequests Comma-separated list of regular expressions. Each parameter name matched by at least one of the expressions will be written from the current context to each outgoing request.
.OutgoingResponse Comma-separated list of regular expressions. Each parameter name matched by at least one of the expressions will be parsed from each incoming response to the current context.
.AsyncDispatch Comma-separated list of regular expressions. Each parameter name matched by at least one of the expressions will be passed along with asynchronous dispatched messages.
.AsyncProcess Comma-separated list of regular expressions. Each parameter name matched by at least one of the expressions will be taken up while processing asynchronous messages.
.invocationIdLength The length of the generated invocation ids. To disable id generation for invocations, set this value to 0.
.sessionIdLength The length of the generated session ids. To disable id generation, set this value to 0.

Configuration resolution

Loading order:

  • At first TracEE scans for all META-INF/tracee.default.properties files on the classpath in undefined order and combines them to a default-properties object.
  • Then TracEE scans for all META-INF/tracee.properties files on the classpath in undefined order and combines them to an application-properties object.
  • The order between each default or non-default properties files ist not defined.

Evaluation strategy:

  • When a connector is configured with a profile, it will lookup the configuration keys with the prefix tracee.profile.PROFILE_NAME.
  • When there is no profile specific configuration for a certain key, it will fall back to the default configuration of the key tracee.default.

If no profile is configured for a connector, it will always lookup the default value.

Generate identifier for the context

Even if an binding handles the incoming invocation and no invocationId is propagated, a new one is generated by default. The length is defined with the tracee.default.invocationIdLength where the value -1 disables the generation completely. For the servlet-binding the corresponding parameter tracee.default.sessionIdLength will adjust he sessionId as well.

License

This project is released under the revised BSD License.

Social Links

Imprint

Web-Template based on SOLID by Carlos Alvarez and remixed according to the Creative Commons Attribution 3.0 License.