Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

In this example, we are using addInstance() which will instantiate the indicated class and handle dependency resolution

Footnote
Wiki Markup
{footnote}Be careful with this, because in some cases, resolving dependencies of the override class can require checking against the ServiceOverrides service, and you'll get a runtime exception about ServiceOverrides requiring itself!{footnote}
Be careful with this, because in some cases, resolving dependencies of the override class can require checking against the ServiceOverrides service, and you'll get a runtime exception about ServiceOverrides requiring itself!
.

Sometimes you'll want to define the override as a service of its own: this is useful if you want to inject a Logger specific to the service, or if the overriding implementation needs a service configuration:

...

Note that the object passed in as delegate may be the core service implementation, or it may be some other interceptor from some other decorator for the same service.

...

Wiki Markup
{display-footnotes}

Wiki Markup
{scrollbar}