Migrating to 3.0

One goal of MDAccess for OSLC 3.0 was to upgrade its third-party libraries, to avoid using a library version having known vulnerabilities, and to no longer require libraries that are obsolete.

While every effort was made to avoid breakage, there are a few areas of incompatibility or new APIs that should be adopted by clients. This document describes those areas and provides instructions for migrating plug-ins to 3.0.

Third-Party Libraries

Refer to the Third-Party Libraries page for details on the new set of required libraries.

Logging

MDAccess for OSLC uses SLF4J for logging messages. In previous version, MDAccess for OSLC also had a dependency on Apache Log4j and tried to initialize the Log4j configuration on its own. This is no longer the case, clients may use any SLF4J compliant logging implementation of their choice.

Actions

  1. Clients are responsible for initializing the logging implementation of their choice. This is for example made with a log4j.configuration system property for Log4j, or a logback.configurationFile system property for Logback.

OSLC Client

In previous version, MDAccess for OSLC was using Apache Wink Client to act as a client for requesting OSLC resources. This library is now retired and MDAccess for OSLC no longer depends on it.

Actions

  1. Change all package imports from org.apache.wink.client.* to com.sodius.oslc.client.*
  2. Change calls to com.sodius.oslc.client.requests.GetResources to set as third parameter the type of resource to obtain, e.g.
    Collection<Configuration> resources = new GetResources(client, uri, Configuration.class).get();
  3. Change calls to com.sodius.oslc.client.ClientResponse when a collection of resources is desired, e.g.
    Collection<Configuration> resources = clientResponse.getEntities(Configuration.class);

JSON Processing

In previous version, MDAccess for OSLC was using Apache Wink JSON4J for processing JSON content. This library is now retired and MDAccess for OSLC no longer depends on it. MDAccess for OSLC now uses Jakarta JSON as a replacement.

Actions

  1. This change is internal to MDAccess for OSLC and clients should not be impacted at all. In the event clients were making direct use of Apache Wink JSON4J, such use should be changed in favor of Jakarta JSON.

Related reference
API Reference