public void internalDeploy(DeploymentUnit unit) throws DeploymentException
{
JBossMetaData beans = (JBossMetaData)unit.getAttachment(
MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME
);
Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
if(beans!=null)
{
WebServiceDeploymentAdapter wsDeployment = new WebServiceDeploymentAdapter();
Iterator<JBossEnterpriseBeanMetaData> iterator = beans.getEnterpriseBeans().iterator();
while(iterator.hasNext())
{
JBossEnterpriseBeanMetaData ejb = iterator.next();
EJBContainer ejbContainer = null;
if (ejb3Deployment != null && !ejb.isEntity())
{
ObjectName objName = null;
try
{
objName = new ObjectName(ejb.determineContainerName());
}
catch (Exception e)
{
throw new DeploymentException(e);
}
ejbContainer = (EJBContainer)ejb3Deployment.getContainer(objName);
}
if(ejb.getEjbClass()!=null)
wsDeployment.getEndpoints().add( new WebServiceDeclarationAdapter(ejb, ejbContainer, unit.getClassLoader()) );
else
log.warn("Ingore ejb deployment with null classname: " + ejb);