public static final String DEPLOYED_OBJECT = "org.jboss.ws.ejb3.deployed.object";
public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep)
{
EJBArchiveMetaData appMetaData = null;
ObjectName oname = (ObjectName)dep.getProperty(DEPLOYED_OBJECT);
// jboss.j2ee:service=EJB3,module=some-ejb3.jar
if (oname != null && oname.getDomain().equals("jboss.j2ee") && "EJB3".equals(oname.getKeyProperty("service")))
{
Ejb3ModuleMBean ejb3Module = getEJB3Module(oname);
ArrayList<EJBMetaData> beans = new ArrayList<EJBMetaData>();
for (Object container : ejb3Module.getContainers().values())
{
if (container instanceof StatelessContainer)
{
StatelessContainer slc = (StatelessContainer)container;
EJBMetaData usmd = new SLSBMetaData();
usmd.setEjbName(slc.getEjbName());
usmd.setEjbClass(slc.getBeanClassName());
beans.add(usmd);
}
}
appMetaData = new EJBArchiveMetaData();
appMetaData.setEnterpriseBeans(beans);
}
return appMetaData;
}