JarDeployer getJarDeployer() { return ClassPathLoader.getLatest().getJarDeployer(); }
JarDeployer jarDeployer = ClassPathLoader.getLatest().getJarDeployer(); jarDeployer.suspendAll(); try {
DeployedJar deployedJar = ClassPathLoader.getLatest().getJarDeployer().getDeployedJar(jar); assertThat(deployedJar).isNotNull(); assertThat(Class.forName(nameOfClassContainedInJar(jar), true, System.out.println("Verifying undeployed jar: " + jar); DeployedJar undeployedJar = ClassPathLoader.getLatest().getJarDeployer().getDeployedJar(jar); assertThat(undeployedJar).isNull();
void applyJarAndXmlFromClusterConfig() { if (this.configurationResponse == null) { // Deploy all the jars from the deploy working dir. ClassPathLoader.getLatest().getJarDeployer().loadPreviouslyDeployedJarsFromDisk(); } ccLoader.applyClusterXmlConfiguration(this, this.configurationResponse, this.system.getConfig().getGroups()); }
@Test public void testZeroLengthFile() throws IOException { File zeroFile = tempFolder.newFile(); zeroFile.createNewFile(); Map<String, File> jarFiles = new HashMap<>(); jarFiles.put("JarDeployerDUnitZLF.jar", zeroFile); assertThatThrownBy(() -> { ClassPathLoader.getLatest().getJarDeployer().deploy(jarFiles); }).isInstanceOf(IllegalArgumentException.class); byte[] validBytes = new ClassBuilder().createJarFromName("JarDeployerDUnitZLF1"); File validFile = tempFolder.newFile(); IOUtils.copy(new ByteArrayInputStream(validBytes), new FileOutputStream(validFile)); jarFiles.put("JarDeployerDUnitZLF1.jar", validFile); jarFiles.put("JarDeployerDUnitZLF2.jar", zeroFile); assertThatThrownBy(() -> { ClassPathLoader.getLatest().getJarDeployer().deploy(jarFiles); }).isInstanceOf(IllegalArgumentException.class); }
InternalCache cache = (InternalCache) context.getCache(); final JarDeployer jarDeployer = ClassPathLoader.getLatest().getJarDeployer(); try { undeployedJars[index++] = ClassPathLoader.getLatest().getJarDeployer().undeploy(jarClassLoader.getJarName()); } catch (IllegalArgumentException iaex) { try { undeployedList.add(jarFilename); undeployedList.add(ClassPathLoader.getLatest().getJarDeployer().undeploy(jarFilename)); } catch (IllegalArgumentException iaex) {
ClassPathLoader.getLatest().getJarDeployer().deploy(stagedFiles); for (int i = 0; i < jarFilenames.size(); i++) { deployedList.add(jarFilenames.get(i));
final JarDeployer jarDeployer = ClassPathLoader.getLatest().getJarDeployer();