Package org.jboss.soa.esb

Examples of org.jboss.soa.esb.ConfigurationException


        checkInputSuffix();

        // WORK suffix (will rename in input directory)
        _workingSuffix = ListenerUtil.getValue(config, ListenerTagNames.FILE_WORK_SFX_TAG, ".esbWork").trim();
        if (_workingSuffix.length() < 1) {
            throw new ConfigurationException("Invalid "+ ListenerTagNames.FILE_WORK_SFX_TAG + " attribute");
        }

        if (_inputSuffix.equals(_workingSuffix)) {
            throw new ConfigurationException("Work suffix must differ from input suffix <" + _workingSuffix + ">");
        }

        // ERROR directory and suffix (defaults to input dir and
        // ".esbError"
        // suffix)
        String sErrDir = ListenerUtil.getValue(config, ListenerTagNames.FILE_ERROR_DIR_TAG, sInpDir);
        _errorDirectory = fileFromString(sErrDir);
        seeIfOkToWorkOnDir(_errorDirectory);

        _errorSuffix = ListenerUtil.getValue(config, ListenerTagNames.FILE_ERROR_SFX_TAG, ".esbError").trim();
        if (_errorSuffix.length() < 1) {
            throw new ConfigurationException("Invalid " + ListenerTagNames.FILE_ERROR_SFX_TAG + " attribute");
        }
        if (_errorDirectory.equals(_inputDirectory) && _inputSuffix.equals(_errorSuffix)) {
            throw new ConfigurationException("Error suffix must differ from input suffix <" + _errorSuffix + ">");
        }

        // Do users wish to delete files that were processed OK ?
        String sPostDel = ListenerUtil.getValue(config, ListenerTagNames.FILE_POST_DEL_TAG, "false").trim();
        _deleteAfterOK = Boolean.parseBoolean(sPostDel);
        if (_deleteAfterOK) {
            return;
        }
       
        // Do users wish to rename files that were processed OK ?
        String sPostRename = ListenerUtil.getValue(config, ListenerTagNames.FILE_POST_RENAME_TAG, "true").trim();
        _renameAfterOK = Boolean.parseBoolean(sPostRename);

        // POST (done) directory and suffix (defaults to input dir and
        // ".esbDone" suffix)
        String sPostDir = ListenerUtil.getValue(config, ListenerTagNames.FILE_POST_DIR_TAG, sInpDir);
        _postProcessDirectory = fileFromString(sPostDir);
        seeIfOkToWorkOnDir(_postProcessDirectory);
        _postProcessSuffix = ListenerUtil.getValue(config, ListenerTagNames.FILE_POST_SFX_TAG, ".esbDone").trim();

        if (_postProcessDirectory.equals(_inputDirectory)) {
            if (_postProcessSuffix.length() < 1) {
                throw new ConfigurationException("Invalid " + ListenerTagNames.FILE_POST_SFX_TAG + " attribute");
            }
            if (_postProcessSuffix.equals(_inputSuffix)) {
                throw new ConfigurationException("Post process suffix must differ from input suffix <" + _postProcessSuffix + ">");
            }
        }
    }
View Full Code Here


        if(uri != null) {
            try {
                return new URI(uri).getPath();
            } catch (URISyntaxException e) {
                throw new ConfigurationException("Invalid '" + ListenerTagNames.URL_TAG + "' value '" + uri + "'.  Must be a valid URI.");
            }
        }

        return config.getRequiredAttribute(ListenerTagNames.FILE_INPUT_DIR_TAG);
    }
View Full Code Here

        FileOutputStream fileOutStream;

        try {
            fileOutStream = new FileOutputStream(gatewayDeployFile);
        } catch (FileNotFoundException e) {
            throw new ConfigurationException("Unexpected exception.", e);
        }

        try {
            deploymentArchive.toOutputStream(fileOutStream);
        } catch (IOException e) {
            throw new ConfigurationException("Error writing deployment archive '" + gatewayDeployFile.getAbsolutePath() + "'.", e);
        } finally {
            try {
                fileOutStream.close();
            } catch (IOException e) {
                log.warn("Error closing deployment archive stream '" + gatewayDeployFile.getAbsolutePath() + "'", e);
View Full Code Here

           
            return new ActionProcessorMethodInfo(processMethods, processSuccess, processException) ;
        }
        catch (final NoSuchMethodException nsme)
        {
            throw new ConfigurationException("Invalid processor method in configuration", nsme) ;
        }
    }
View Full Code Here

        {
            return actionClass.getConstructor(new Class[] {ConfigTree.class}) ;
        }
        catch (final NoSuchMethodException nsme)
        {
            throw new ConfigurationException("Action " + actionClass.getName() + " does not have correct constructor") ;
        }
    }
View Full Code Here

        {
            return actionConstructor.newInstance(actionConfig) ;
        }
        catch (final Exception ex)
        {
            throw new ConfigurationException("Unexpected exception while instantiating action instance", ex) ;
        }
    }
View Full Code Here

        super(config);
        String scriptPath = config.getAttribute("script");

        scriptPath = mapToPrebundledScript(scriptPath);
        if(scriptPath == null) {
            throw new ConfigurationException("No Groovy script specified on listener config " + config.getAttribute("name"));
        } else {
            try {
                GroovyShell shell = new GroovyShell();
                script = shell.parse(GroovyActionProcessor.getScriptFromClasspath(scriptPath));
            } catch (Exception e) {
                throw new ConfigurationException("Error loading Groovy script '" + scriptPath + "' stream.", e);
            }
        }
    }
View Full Code Here

    }
    catch (Exception ex)
    {
      requestEnd();
     
      throw new ConfigurationException("Cannot instantiate "+this.getClass().getSimpleName(),ex);
    }

  } // ________________________________
View Full Code Here

    {
                    new Thread(conf).start() ;
                    return conf;
    }

    throw new ConfigurationException(
        "Unable to generate gateway and listener configurations");
  } // ________________________________
View Full Code Here

          }
          catch (NumberFormatException ex)
          {
            logger.error("Invalid value for timeoutInMillis: "+timeoutAttr);
           
            throw new ConfigurationException(ex);
          }
        }
       
        logger.debug("Aggregator config:  timeoutInMillis=" + timeoutInMillis);
        splitId = config.getAttribute("splitId");
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.ConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.