Page 1 of 1

--Using ServerContext

PostPosted: Tue Dec 09, 2014 3:40 pm
by Development@SIB


This article is outdated - please use our new system at

https://doc.sibvisions.com




The ServerContext is a special Context for server-side objects. If you create your own plugins or extend the server, session manager, object provider or a server class, it can useful to have access to the affected session. The ServerContext will be created before the SessionContext and it exists during the whole server-side execution of a call.

The ServerContext has few methods:
Syntax: [ Download ] [ Hide ]
protected abstract void destroy();
public abstract ISession getSession();
public abstract String getSystemIdentifier();
public abstract String getServerIdentifier();
public abstract ICallHandler getCallHandler();

You shouldn't call destroy because it makes the context unusable.

The system identifier is a unique identifier for the server environment. It depends on the deployment mode, e.g. a desktop application will return the working directory as system identifier. If you deploy the server on an application server, the context URL will be used as system identifier.