}
} finally {
//cleanup as much as we can.
Bus bus = BusFactory.getDefaultBus(false);
if (bus != null) {
bus.shutdown(true);
}
Thread.currentThread().setContextClassLoader(origContext);
System.setProperty("java.class.path", cp);
Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());