File file = new File(filename);
try {
IArchive archive = removeArchiveIfDeployed(file);
if (archive != null) {
IDeployable deployable = DeployableHelper.getDeployable(archive);
if (deployable instanceof EJBDeployable || deployable instanceof EARDeployable) {
deployer.deploy(deployable);
} else {
logger.warn("Archive \"" + file.getName() + "\" not available.");
}