Java 类org.quartz.old.JobExecutionException 实例源码

项目:AvoinApotti    文件:DnaBatchUpdateImpl.java   
private String getOutputFolder() throws JobExecutionException
{
    String folderName = null;

    if(ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue() == null || ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue().length() == 0)
    {
        if ( System.getProperty("catalina.home") == null)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("The JVM parameter 'catalina.home' was not found !");               
        }

        folderName = System.getProperty("catalina.home") + "/TransactionExport/";               
    }
    else
    {
        folderName = ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue();

        if(!(folderName.endsWith("\\") || folderName.endsWith("/")))
        {
            folderName += System.getProperty("file.separator");
        }
    }

    File folder = new File(folderName);

    if(folder.exists() == false)
    {
        boolean bSuccess = folder.mkdir();

        if(bSuccess == false)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("I could not create the folder '" + folder.getAbsolutePath() + "' !");
        }
    }

    return folderName;
}
项目:openMAXIMS    文件:DnaBatchUpdateImpl.java   
private String getOutputFolder() throws JobExecutionException
{
    String folderName = null;

    if(ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue() == null || ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue().length() == 0)
    {
        if ( System.getProperty("catalina.home") == null)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("The JVM parameter 'catalina.home' was not found !");               
        }

        folderName = System.getProperty("catalina.home") + "/TransactionExport/";               
    }
    else
    {
        folderName = ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue();

        if(!(folderName.endsWith("\\") || folderName.endsWith("/")))
        {
            folderName += System.getProperty("file.separator");
        }
    }

    File folder = new File(folderName);

    if(folder.exists() == false)
    {
        boolean bSuccess = folder.mkdir();

        if(bSuccess == false)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("I could not create the folder '" + folder.getAbsolutePath() + "' !");
        }
    }

    return folderName;
}
项目:openMAXIMS    文件:DnaBatchUpdateImpl.java   
private String getOutputFolder() throws JobExecutionException
{
    String folderName = null;

    if(ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue() == null || ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue().length() == 0)
    {
        if ( System.getProperty("catalina.home") == null)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("The JVM parameter 'catalina.home' was not found !");               
        }

        folderName = System.getProperty("catalina.home") + "/TransactionExport/";               
    }
    else
    {
        folderName = ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue();

        if(!(folderName.endsWith("\\") || folderName.endsWith("/")))
        {
            folderName += System.getProperty("file.separator");
        }
    }

    File folder = new File(folderName);

    if(folder.exists() == false)
    {
        boolean bSuccess = folder.mkdir();

        if(bSuccess == false)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("I could not create the folder '" + folder.getAbsolutePath() + "' !");
        }
    }

    return folderName;
}
项目:openmaxims-linux    文件:DnaBatchUpdateImpl.java   
private String getOutputFolder() throws JobExecutionException
{
    String folderName = null;

    if(ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue() == null || ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue().length() == 0)
    {
        if ( System.getProperty("catalina.home") == null)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("The JVM parameter 'catalina.home' was not found !");               
        }

        folderName = System.getProperty("catalina.home") + "/TransactionExport/";               
    }
    else
    {
        folderName = ConfigFlag.GEN.BATCH_JOB_EXPORT_FOLDER.getValue();

        if(!(folderName.endsWith("\\") || folderName.endsWith("/")))
        {
            folderName += System.getProperty("file.separator");
        }
    }

    File folder = new File(folderName);

    if(folder.exists() == false)
    {
        boolean bSuccess = folder.mkdir();

        if(bSuccess == false)
        {
            LOG.error("The JVM parameter 'catalina.home' was not found !");
            throw new JobExecutionException("I could not create the folder '" + folder.getAbsolutePath() + "' !");
        }
    }

    return folderName;
}