private void ensureUniqueInstanceNameBetweenMuleApps(String instanceName) throws InitialisationException { synchronized (instanceNamesLock) { if (instanceNames.keySet().contains(instanceName)) { throw new InitialisationException(CoreMessages.initialisationFailure(String.format("Value '%s' of quartz connector property '%s' cannot be reused in different applications", instanceName, QUARTZ_INSTANCE_NAME_PROPERTY)), this); } if (logger.isDebugEnabled()) { logger.debug("Adding quartz instance name: " + instanceName); } instanceNames.put(instanceName, this); } }
@Override public void initialise() throws InitialisationException { if (maxRedeliveryCount < 0) { throw new InitialisationException( CoreMessages.initialisationFailure( "maxRedeliveryCount must be positive"), this); } if (deadLetterQueue instanceof Initialisable) { ((Initialisable) deadLetterQueue).initialise(); } }
protected void lookupObjectInstance() throws InitialisationException { if (logger.isDebugEnabled()) { logger.debug(String.format( "No object instance speciedied. Looking up single instance of type %s in mule registry", objectType)); } try { object = muleContext.getRegistry().lookupObject(objectType); } catch (RegistrationException e) { throw new InitialisationException( CoreMessages.initialisationFailure(String.format( "Muliple instances of '%s' were found in the registry so you need to configure a specific instance", objectType)), this); } if (object == null) { throw new InitialisationException(CoreMessages.initialisationFailure(String.format( "No instance of '%s' was found in the registry", objectType)), this); } }
public void setWorkingDirectory(String workingDirectory) { if (verifyContextNotInitialized()) { try { File canonicalFile = FileUtils.openDirectory(workingDirectory); this.workingDirectory = canonicalFile.getCanonicalPath(); } catch (IOException e) { throw new IllegalArgumentException(CoreMessages.initialisationFailure( "Invalid working directory").getMessage(), e); } } }
CoreMessages.initialisationFailure(String.format( "The message digest algorithm '%s' was specified when a secure hash will not be used", messageDigestAlgorithm)), this); CoreMessages.initialisationFailure( "No method for identifying messages was specified"), this); CoreMessages.initialisationFailure( String.format("Exception '%s' initializing message digest algorithm %s", e.getMessage(), messageDigestAlgorithm)), this);
throw new InitialisationException(CoreMessages.initialisationFailure("Quartz connector"), e, this);
/** * Obtains the expression manager from the Mule context and initialises the connector. If a target object has not been set already it will search the Mule registry for a default one. * * @throws InitialisationException */ public void initialise() throws InitialisationException { retryCount = new AtomicInteger(); expressionManager = muleContext.getExpressionManager(); patternInfo = TemplateParser.createMuleStyleParser().getStyle(); if (moduleObject == null) { try { moduleObject = muleContext.getRegistry().lookupObject(FTPServerModuleLifecycleAdapter.class); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object"), this); } } catch (RegistrationException e) { throw new InitialisationException(CoreMessages.initialisationFailure("org.mule.munit.config.FTPServerModuleLifecycleAdapter"), e, this); } } if (moduleObject instanceof String) { moduleObject = muleContext.getRegistry().lookupObject(((String) moduleObject)); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object by config name"), this); } } }
/** * Obtains the expression manager from the Mule context and initialises the connector. If a target object has not been set already it will search the Mule registry for a default one. * * @throws InitialisationException */ public void initialise() throws InitialisationException { retryCount = new AtomicInteger(); expressionManager = muleContext.getExpressionManager(); patternInfo = TemplateParser.createMuleStyleParser().getStyle(); if (moduleObject == null) { try { moduleObject = muleContext.getRegistry().lookupObject(FTPServerModuleLifecycleAdapter.class); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object"), this); } } catch (RegistrationException e) { throw new InitialisationException(CoreMessages.initialisationFailure("org.mule.munit.config.FTPServerModuleLifecycleAdapter"), e, this); } } if (moduleObject instanceof String) { moduleObject = muleContext.getRegistry().lookupObject(((String) moduleObject)); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object by config name"), this); } } }
/** * Obtains the expression manager from the Mule context and initialises the connector. If a target object has not been set already it will search the Mule registry for a default one. * * @throws InitialisationException */ public void initialise() throws InitialisationException { retryCount = new AtomicInteger(); expressionManager = muleContext.getExpressionManager(); patternInfo = TemplateParser.createMuleStyleParser().getStyle(); if (moduleObject == null) { try { moduleObject = muleContext.getRegistry().lookupObject(FTPServerModuleLifecycleAdapter.class); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object"), this); } } catch (RegistrationException e) { throw new InitialisationException(CoreMessages.initialisationFailure("org.mule.munit.config.FTPServerModuleLifecycleAdapter"), e, this); } } if (moduleObject instanceof String) { moduleObject = muleContext.getRegistry().lookupObject(((String) moduleObject)); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object by config name"), this); } } }
/** * Obtains the expression manager from the Mule context and initialises the connector. If a target object has not been set already it will search the Mule registry for a default one. * * @throws InitialisationException */ public void initialise() throws InitialisationException { retryCount = new AtomicInteger(); expressionManager = muleContext.getExpressionManager(); patternInfo = TemplateParser.createMuleStyleParser().getStyle(); if (moduleObject == null) { try { moduleObject = muleContext.getRegistry().lookupObject(FTPServerModuleLifecycleAdapter.class); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object"), this); } } catch (RegistrationException e) { throw new InitialisationException(CoreMessages.initialisationFailure("org.mule.munit.config.FTPServerModuleLifecycleAdapter"), e, this); } } if (moduleObject instanceof String) { moduleObject = muleContext.getRegistry().lookupObject(((String) moduleObject)); if (moduleObject == null) { throw new InitialisationException(MessageFactory.createStaticMessage("Cannot find object by config name"), this); } } }