public interface CmsSessionService
The service does not own the session. The SlContext.close() method does not close the session.
String user = "";
String password = "";
String server = "myCms:6400";
String authentication = "secEnterprise";
IEnterpriseSession session = CrystalEnterprise.getSessionMgr().logon(user, password, server, authentication);
SlContext context = SlContext.create();
context.getService(CmsSessionService.class).setSession(session);
...
context.close();
session.logoff();
SlContext| Modifier and Type | Method and Description |
|---|---|
com.crystaldecisions.sdk.framework.IEnterpriseSession |
getSession()
Returns the session.
|
void |
setSession(com.crystaldecisions.sdk.framework.IEnterpriseSession session)
Sets a session.
|
com.crystaldecisions.sdk.framework.IEnterpriseSession getSession()
If the context is not attached to the session, the method returns null.
IEnterpriseSession objectvoid setSession(com.crystaldecisions.sdk.framework.IEnterpriseSession session)
The session can only be set once. A second method call throws an exception.
session - The session, which cannot be null