/** * Add the specified jar to the remote app's system classpath. * * @param path the absolute path to the .jar file. * @throws Exception in case of failure. */ public void installHelperJar(String path) throws Exception { List<String> jarPaths = new LinkedList<String>(); jarPaths.add(path); submit.addJarsToSystemClassloader(jarPaths); Properties properties = new Properties(); properties.setProperty(BytemanTestHelper.RMIREGISTRY_PORT_PROPERTY_NAME, ""+rmiRegistryPort); submit.setSystemProperties(properties); }
private static void uploadAgentProperties() throws Exception { // if any Byteman config changes have been requested and // are allowed upload all reconfigured system property // settings to the agent. BMUnitConfigState previousConfigState = currentConfigState.previous; if (needPropertyReset(currentConfigState, previousConfigState)) { Submit submit = new Submit(currentConfigState.getHost(), currentConfigState.getPort()); Properties properties = new Properties(); if (configurePropertyReset(currentConfigState, previousConfigState, properties)) { submit.setSystemProperties(properties); } } }
results = client.setSystemProperties(propsToSet); } else { if (deleteRules) {
private static void resetAgentProperties() throws Exception { // if we uploaded any reconfigured system property settings // to the agent then revert them BMUnitConfigState previousConfigState = currentConfigState.previous; if (previousConfigState != null && previousConfigState.isAllowConfigUpdate()) { if (needPropertyReset(previousConfigState, currentConfigState)) { Submit submit = new Submit(currentConfigState.getHost(), currentConfigState.getPort()); Properties properties = new Properties(); if (configurePropertyReset(previousConfigState, currentConfigState, properties)) { submit.setSystemProperties(properties); } } } }