// Setup the third constructor argument (vfs deployment unit).
bmdBuilder.addConstructorParameter(VFSDeploymentUnit.class.getName(), deploymentUnit);
if (warFilesDir == null)
{
final String errorMsg = String.format("No property named '%s' was configured in jbossesb.sar/META-INF/jboss-service.xml for %s", "warFilesDir", getClass().getName());
throw new DeploymentException(errorMsg);
}
final File tmpDir = new File(warFilesDir);
if (!tmpDir.exists())
{
final String errorMsg = String.format("The directory configured for %s='%s' does not exist.", "warFilesDir", tmpDir);
throw new DeploymentException(errorMsg);
}
// Setup the fourth constructor argument (temp war directory).
File esbWarFiles = JBossDeployerUtil.createDir(tmpDir, "esbwarfiles");
bmdBuilder.addConstructorParameter(File.class.getName(), esbWarFiles);
// Add management annotation.