Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Java API 2 - MetadataManager refresh depricated! What to use now?

Hello Experts,

as the function in the MDM Java API for the MetadataManager class called refreshInstance() is depricated, I ask myself what to use instead?

I have the need to reload the meta data automatically without restarting the API on the WebAS because attributes and values have been added to the repository. I use the named function to reload the meta data now and it works perfect.

But since the method is deprecated and guess it will be removed from the API some day I do not know how to reload the data.

Or will the meta data be refreshed based on update events that the manager registered to?

Can anyone enlighten me on this topic?

Many thanks in advance!



Former Member
Former Member replied


Refer - MDM JAVA API guide for more information -

Keeping Metadata Up-to-Date

The metadata information stored in the Metadata Manager cache can become out-of-date if somebody makes changes (repository schema, security information or attributes data) using the MDM Console, MDM Data Manager, or API.

To keep the metadata up-to-date, the implementation of the MetadataManager class is supplied with the Event Dispatcher which can listen for all changes on the MDM server and send notifications when the metadata is changed.

When this notification is received, the manager removes the relevant portion of metadata from the cache so that in the next request, the information is retrieved from the server and the cache is renewed.

To enable the Event Dispatcher, call the following registration methods:

● registerRepositoryNotifications(RepositorySessionContext ctx, String serverPassword, String repositoryPassword)

This method subscribes to all server and repository events (all changes that can be done through the MDM Console). It is important for updating the repository schema cache.

● registerDataNotifications(UserSessionContext ctx, String repositoryPassword)

This method subscribes to all data events (all changes that can be done through the MDM Data Manager). It is important for updating the taxonomy attributes cache.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question