@Override protected void preStart() throws ModuleException { //Check if the broker URL is supplied String url = getURL(); if(url == null) { throw new ModuleException(Messages.START_FAIL_NO_URL); } try { mDataEmitter = new RemoteDataEmitter(url, getUsername(), mPassword, this); } catch(Exception e) { throw new ModuleException(e, Messages.ERROR_STARTING_MODULE); } }
@Override public synchronized final void start() { doStart(); if(parameters.getUseJms()) { try { emitter = new RemoteDataEmitter(parameters.getURL(), parameters.getUsername(), String.valueOf(parameters.getPassword()), this); } catch (Exception e) { throw new ConnectionException(e, new I18NBoundMessage2P(Messages.ERROR_JMS_CONNECT, parameters.getURL(), parameters.getUsername())); } } else { emitter = null; } running.set(true); } /* (non-Javadoc)