@Override public int compare(JobDef o1, JobDef o2) { return o1.getJarPath().compareTo(o2.getJarPath()); } });
@Override public int compare(JobDef o1, JobDef o2) { return o1.getJarPath().compareTo(o2.getJarPath()); } });
/** * Returns true if the libraries should be loaded in cache. Two cases: never loaded and should be reloaded (jar is more recent than * cache) */ private boolean shouldLoad(Node node, JobDef jd) { if (!cache.containsKey(jd.getApplicationName())) { return true; } // If here: cache exists. JobDefLibrary libs = cache.get(jd.getApplicationName()); // Is cache stale? Date lastLoaded = libs.loadTime; File jarFile = new File(FilenameUtils.concat(new File(node.getRepo()).getAbsolutePath(), jd.getJarPath())); File jarDir = jarFile.getParentFile(); File libDir = new File(FilenameUtils.concat(jarDir.getAbsolutePath(), "lib")); if (lastLoaded.before(new Date(jarFile.lastModified())) || lastLoaded.before(new Date(jarDir.lastModified())) || lastLoaded.before(new Date(libDir.lastModified()))) { jqmlogger.info("The cache for application " + jd.getApplicationName() + " will be reloaded"); return true; } // If here, the cache is OK return false; }
if (currentJarPath == null || !j.getJarPath().equals(currentJarPath)) currentJarPath = j.getJarPath(); Element jar = new Element("jar"); addTextElementToParentElement(jar, "path", currentJarPath);
if (currentJarPath == null || !j.getJarPath().equals(currentJarPath)) currentJarPath = j.getJarPath(); Element jar = new Element("jar"); addTextElementToParentElement(jar, "path", currentJarPath);
File jarFile = new File(FilenameUtils.concat(new File(node.getRepo()).getAbsolutePath(), jd.getJarPath())); File jarDir = jarFile.getParentFile(); File libDir = new File(FilenameUtils.concat(jarDir.getAbsolutePath(), "lib"));
static List<String> getProcessArguments(JobInstance ji) { return getProcessArguments(ji.getJD().getJarPath(), ji.getPrms(), ji.getJD().getPathType()); }
static List<String> getProcessArguments(JobInstance ji) { return getProcessArguments(ji.getJD().getJarPath(), ji.getPrms(), ji.getJD().getPathType()); }
URL[] resolve(JobInstance ji) throws JqmPayloadException { ConfigurableMavenResolverSystem resolver = getMavenResolver(); try { return extractMavenResults(resolver.resolve(ji.getJD().getJarPath()).withTransitivity().asFile()); } catch (JqmPayloadException e) { throw e; } catch (Exception e) { throw new JqmPayloadException("Could not resolve a Maven payload path", e); } }
File jarFile = new File(FilenameUtils.concat(new File(ji.getNode().getRepo()).getAbsolutePath(), jd.getJarPath())); if (sharedJarClassLoader.containsKey(jd.getJarPath())) jobClassLoader = sharedJarClassLoader.get(jd.getJarPath()); jobClassLoader = new PayloadClassLoader(parent); jobClassLoader.mayBeShared(true); sharedJarClassLoader.put(jd.getJarPath(), jobClassLoader);
+ this.ji.getJD().getJarPath() + " - class is: " + this.ji.getJD().getJavaClassName() + ". Runner used is " + jr.getClass().getCanonicalName() + ".");
+ this.ji.getJD().getJarPath() + " - class is: " + this.ji.getJD().getJavaClassName() + ". Runner used is " + jr.getClass().getCanonicalName() + ".");
Assert.assertEquals("jqm-tests/jqm-test-fibo/target/test.jar", fibo.getJarPath()); Assert.assertEquals("FS", fibo.getPathType().toString()); Assert.assertEquals("VIPQueue", fibo.getQueue(cnx).getName());