/** Verifies that the <code>FactoryDestination</code> is in valid state before it is started. */ protected void validate() { if (isValid()) return; super.validate(); if (factory == null) { if (factoryId == null) { factoryId = DEFAULT_FACTORY; } MessageBroker broker = getService().getMessageBroker(); FlexFactory f = broker.getFactory(factoryId); if (f == null) { ConfigurationException ex = new ConfigurationException(); ex.setMessage(INVALID_FACTORY, new Object[] {getId(), factoryId}); throw ex; } factory = f; } if (scope == null) scope = FlexFactory.SCOPE_REQUEST; if (source == null) source = getId(); }