Are the methods defined in MetadataProvider interface thread safe? [Java]

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Are the methods defined in MetadataProvider interface thread safe? [Java]

The Server ensures sequentiality of calls only in specific cases:

Any invocation of notifyNewSession happens after the termination of the corresponding invocation of notifyUser;
the corresponding invocation was the one for which the "httpHeaders" parameter was the same Map instance as what returned by clientContext.get("HTTP_HEADERS").

Any invocation of a method reporting a session ID happens after the termination of notifyNewSession for the same ID.

Any invocation of notifyTablesClose happens after the termination of the corresponding notifyNewTables.

In all the above cases, the preceding and following invocations may occur on different threads, but they are guaranteed to be kept synchronized by the Server kernel.In all other cases, concurrent invocations are possible and the Metadata Adapter implementation must be able to cope with that.

Note that if some implementations are blocking (as in the described case), you should also configure the size of the SERVER thread pool in a suitable way.