Page 1 of 1

--Default connection properties

PostPosted: Tue Oct 01, 2013 3:21 pm
by Development@SIB


This article is outdated - please use our new system at

https://doc.sibvisions.com




Our ProjX application sets additional/default connection properties for the MasterConnection and every screen connection (means SubConnection used for work-screens). The additional properties are:

Syntax: [ Download ] [ Hide ]
con.setProperty(IConnectionConstants.PREFIX_CLIENT + ILauncher.PARAM_CODEBASE,
                launcher.getParameter(ILauncher.PARAM_CODEBASE));

con.setProperty(IConnectionConstants.PREFIX_CLIENT + ILauncher.PARAM_SERVERBASE,
                launcher.getParameter(ILauncher.PARAM_SERVERBASE));    

con.setProperty(IConnectionConstants.PREFIX_SERVER + IConnectionConstants.PREFIX_SESSION +
                "language", getLanguage());

con.setProperty(IConnectionConstants.PREFIX_CLIENT + "launcher",
                launcher.getUIResource().getClass().getName());

con.setProperty(IConnectionConstants.PREFIX_CLIENT + ILauncher.PARAM_UIFACTORY,
                launcher.getFactory().getClass().getName());

con.setProperty(IConnectionConstants.PREFIX_CLIENT + ILauncher.PARAM_ENVIRONMENT,
                launcher.getEnvironmentName());

All properties are available on server-side, in your session:

Syntax: [ Download ] [ Hide ]
SessionContext.getCurrentSession().getProperty(IConnectionConstants.PREFIX_CLIENT +
                                               ILauncher.PARAM_ENVIRONMENT)

It's easy to handle different environments or different launcher implementations with above properties.