Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Appendix B. Fabric URL Handlers

download PDF

Abstract

The Fabric runtime provides a variety of URL handlers, which can be used in application code deployed in a Fabric-enabled container. These URLs are intended to be used in profile configuration files to locate configuration resources.

B.1. Profile URL handler

The profile URL is used to access resources stored under the current profile (or parent profile). It has the following format:
profile:ResourceName
A key characteristic of the profile URL is that the location of a resource can change dynamically at run time, as follows:
  1. The profile URL handler first tries to find the named resource, ResourceName, in the current version of the current profile (where the current version is a property of the container in which the profile is running).
  2. If the specified resource is not found in the current profile, the profile URL tries to find the resource in the current version of the parent profile.
This behavior implies that whenever you change the version assigned to a container (for example, by invoking the fabric:container-upgrade or fabric:container-rollback console commands), the referenced resources are also, automatically, upgraded or rolled back.
Profile URL handler service reference for bundles
You need to define a profile URL handler service reference for a bundle to avoid the race condition. If the service reference is not defined the bundle attempts to use the profile protocol before it is actually available for usage. An example to define the service reference in the blueprint.xml file is as follows:
 
<reference id="resolverRef" interface="org.osgi.service.url.URLStreamHandlerService" filter="(url.handler.protocol=profile)" availability="mandatory"/> .
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.