ApplicationClientDD dd = unit.getAttachment(getDeploymentType());
// FIXME: implement metadata complete
// if(dd != null && dd.getMetaDataComplete())
// return;
// for now the EJB3 client deployer handles all
if(dd != null)
return;
try
{
String mainClassName = getMainClassName(unit);
if(mainClassName == null)
return;
Class<?> mainClass = unit.getClassLoader().loadClass(mainClassName);
log.info("mainClass = " + mainClass);
if(hasAnnotations(mainClass))
{
// add a dummy application client dd to fire up the ejb3 client deployer
dd = new ApplicationClientDD();
unit.addAttachment(ApplicationClientDD.class, dd);
}
}
catch(ClassNotFoundException e)
{
throw new DeploymentException(e);
}
catch(IOException e)
{
throw new DeploymentException(e);
}