dep.setRuntimeClassLoader(di.ucl);
dep.setType(getDeploymentType());
Service service = dep.getService();
ApplicationMetaData appmd = (ApplicationMetaData)di.metaData;
if (appmd == null)
throw new IllegalStateException("Deployment unit does not contain application meta data");
WebservicesMetaData wsMetaData = getWebservicesMetaData(di, null);
if (wsMetaData == null)
throw new IllegalStateException("Deployment unit does not contain webservices meta data");
// Copy the attachments
dep.addAttachment(WebservicesMetaData.class, wsMetaData);
dep.addAttachment(ApplicationMetaData.class, appmd);
for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
{
for (PortComponentMetaData pcmd : wsd.getPortComponents())
{
String ejbLink = pcmd.getEjbLink();
if (ejbLink == null)
throw new IllegalStateException("ejb-link cannot be null");
BeanMetaData beanMetaData = appmd.getBeanByEjbName(ejbLink);
if (beanMetaData == null)
throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);
String ejbClass = beanMetaData.getEjbClass();