@Override
public void execute() throws MojoExecutionException, MojoFailureException {
final Deployer deployer = (Deployer) lookup("openejb/DeployerBusinessRemote");
final Collection<AppInfo> infos = deployer.getDeployedApps();
final Lines lines = new Lines();
lines.add(new Line("Name", "Class", "Interface Type", "Bean Type"));
for (AppInfo info : infos) {
for (EjbJarInfo ejbJar : info.ejbJars) {
for (EnterpriseBeanInfo bean : ejbJar.enterpriseBeans) {
lines.add(new Line(bean.ejbDeploymentId, bean.ejbClass, getType(bean), componentType(bean)));
}
}
}
lines.print(new LogPrinterStream(getLog()));
}