final Configuration config = _wapp.getConfiguration();
_exec = exec; //fake
try {
final WebAppCtrl wappc = (WebAppCtrl)_wapp;
final DesktopCache dc = _sess != null ? wappc.getDesktopCache(_sess): null;
//_sess is null if in a working thread
final IdGenerator idgen = wappc.getIdGenerator();
if (idgen != null)
_id = idgen.nextDesktopId(this);
if (_id == null)
_id = nextDesktopId(dc);
else if (idgen != null)
ComponentsCtrl.checkUuid(_id);
updateUuidPrefix();
config.invokeDesktopInits(this, request); //it might throw exception
if (exec != null && exec.isVoided()) return; //sendredirect or forward
if (dc != null)
dc.addDesktop(this); //add to cache after invokeDesktopInits
final Monitor monitor = config.getMonitor();
if (monitor != null) {
try {
monitor.desktopCreated(this);