private void updateDomainData() { String propertyKey = "dataupdate_domain_done"; String done = iwma.getSettings().getProperty(propertyKey); if (done == null) { ICDomainHome domainHome = null; ICDomain defaultDomain = null; try { domainHome = (ICDomainHome) IDOLookup.getHome(ICDomain.class); defaultDomain = domainHome.findDefaultDomain(); } catch (FinderException e) { if (defaultDomain == null) { try { defaultDomain = domainHome.findFirstDomain(); defaultDomain.setType(ICDomain.TYPE_DEFAULT); defaultDomain.store(); iwma.getSettings().setProperty(propertyKey, "true"); } catch (FinderException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } catch (IDOLookupException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
/** Not Implemented fully */ public void executeServices(IWMainApplication application) { List list = application.getSettings().getServiceClasses(); if (list != null) { Iterator iter = list.iterator(); while (iter.hasNext()) { Class theClass = (Class) iter.next(); try { IWService theService = (IWService) theClass.newInstance(); theService.startService(application); } catch (Exception ex) { log.log(Level.WARNING, "Error starting service " + theClass.getName(), ex); } } } }