List<ModelNode> nodes = steps.get("step-" + i).get(RESULT).asList();
for (ModelNode node : nodes)
{
if (ModelAdapter.wasSuccess(node))
{
DeployedEjb ejb = deployedEjbEntityAdapter.fromDMR(node.get(RESULT));
List<ModelNode> address = node.get(ADDRESS).asList();
Property property = address.get(address.size() - 1).asProperty();
String ejbName = property.getValue().asString();
ejb.setName(ejbName);
ejb.setSubsystem(subsystem);
String beanType = property.getName();
if ("entity-bean".equals(beanType))
{
ejb.setType(entityBean);
}
else if ("message-driven-bean".equals(beanType))
{
ejb.setType(messageDrivenBean);
}
else if ("singleton-bean".equals(beanType))
{
ejb.setType(singletonBean);
}
else if ("stateless-session-bean".equals(beanType))
{
ejb.setType(statelessSessionBean);
}
else if ("stateful-session-bean".equals(beanType))
{
ejb.setType(statefulSessionBean);
}
ejb.setAddress(addressFor(subsystem.getAddress(), beanType, ejb.getName()));
ejbs.add(ejb);
}
}
}
}