Trace: • Default Connection Properties
Our ProjX application sets additional/default connection properties for the MasterConnection and every screen connection (means SubConnection used for workscreens). The additional properties are:
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 the server side in your session:
SessionContext.getCurrentSession().getProperty(IConnectionConstants.PREFIX_CLIENT + ILauncher.PARAM_ENVIRONMENT);
It's easy to handle different environments or different launcher implementations with the above properties.