{
List<EJBMetaData> ejbMetaDataList = new ArrayList<EJBMetaData>();
Iterator<WebServiceDeclaration> it = ejb3Deployment.getServiceEndpoints().iterator();
while (it.hasNext())
{
WebServiceDeclaration container = it.next();
// TODO: Add PortComponent parsing to EJBDescriptorHandler
PortComponentSpec pcMetaData = container.getAnnotation(PortComponentSpec.class);
MessageDriven mdbMetaData = container.getAnnotation(MessageDriven.class);
EJBMetaData ejbMetaData = null;
if(mdbMetaData!=null)
{
ejbMetaData = new MDBMetaData();
ActivationConfigProperty[] props = mdbMetaData.activationConfig();
if (props != null)
{
String destination = getActivationProperty("destination", props);
if (destination != null)
{
((MDBMetaData)ejbMetaData).setDestinationJndiName(destination);
}
}
}
else
{
ejbMetaData = new SLSBMetaData();
}
if (ejbMetaData != null)
{
ejbMetaData.setEjbName(container.getComponentName());
ejbMetaData.setEjbClass(container.getComponentClassName());
if (pcMetaData != null)
{
ejbMetaData.setPortComponentName(pcMetaData.portComponentName());
ejbMetaData.setPortComponentURI(pcMetaData.portComponentURI());