boolean oldDelegate = this.delegate;
this.delegate = delegate;
- support.firePropertyChange("delegate", new Boolean(oldDelegate),
- new Boolean(this.delegate));
+ support.firePropertyChange("delegate", Boolean.valueOf(oldDelegate),
+ Boolean.valueOf(this.delegate));
}
boolean oldReloadable = this.reloadable;
this.reloadable = reloadable;
support.firePropertyChange("reloadable",
- new Boolean(oldReloadable),
- new Boolean(this.reloadable));
+ Boolean.valueOf(oldReloadable),
+ Boolean.valueOf(this.reloadable));
}
oname=new ObjectName(ctx.getEngineName() + ":type=Loader,path=" +
path + ",host=" + ctx.getParent().getName());
Registry.getRegistry(null, null).registerComponent(this, oname, null);
- controller=oname;
} catch (Exception e) {
log.error("Error registering loader", e );
}
@Override
protected void destroyInternal() {
- if( controller==oname ) {
- // Self-registration, undo it
- Registry.getRegistry(null, null).unregisterComponent(oname);
- oname = null;
- }
+ Registry.getRegistry(null, null).unregisterComponent(oname);
+ oname = null;
}
/**
String path = libDir.getCanonicalPath();
classLoader.addPermission(path);
} catch (IOException e) {
+ // Ignore
}
}
String path = libDir.getCanonicalPath();
classLoader.addPermission(path);
} catch (IOException e) {
+ // Ignore
}
}
if (classesURL != null) {
String path = classesDir.getCanonicalPath();
classLoader.addPermission(path);
} catch (IOException e) {
+ // Ignore
}
}
}
}
} catch (MalformedURLException e) {
+ // Ignore
}
}
} else {
classRepository = new File(workDir, classesPath);
- classRepository.mkdirs();
+ if (!classRepository.mkdirs())
+ throw new IOException(
+ sm.getString("webappLoader.mkdirFailure"));
if (!copyDir(classes, classRepository)) {
throw new IOException(
sm.getString("webappLoader.copyFailure"));
} else {
copyJars = true;
destDir = new File(workDir, libPath);
- destDir.mkdirs();
+ if (!destDir.mkdirs())
+ throw new IOException(
+ sm.getString("webappLoader.mkdirFailure"));
}
// Looking up directory /WEB-INF/lib in the context
String cp=getClasspath( loader );
if( cp==null ) {
log.info( "Unknown loader " + loader + " " + loader.getClass());
- break;
} else {
if (n > 0)
classpath.append(File.pathSeparator);
if (!copy((InputStream) object, os))
return false;
} else if (object instanceof DirContext) {
- currentFile.mkdir();
+ if (!currentFile.mkdir())
+ return false;
if (!copyDir((DirContext) object, currentFile))
return false;
}
org.apache.juli.logging.LogFactory.getLog( WebappLoader.class );
private ObjectName oname;
- private ObjectName controller;
public ObjectName preRegister(MBeanServer server,
ObjectName name) throws Exception {
}
public void postRegister(Boolean registrationDone) {
+ // NOOP
}
public void preDeregister() throws Exception {
+ // NOOP
}
public void postDeregister() {
+ // NOOP
}
-
- public ObjectName getController() {
- return controller;
- }
-
- public void setController(ObjectName controller) {
- this.controller = controller;
- }
-
}