final Map<Class<? extends Annotation>, ReferenceResolver> resolvers = this.getResolvers(unit);
if (WSHelper.isJaxwsJseDeployment(dep))
{
this.log.debug("Building injection meta data for JAXWS JSE webservice deployment: " + dep.getSimpleName());
final EnvironmentEntriesMetaData envEntriesMD = jbossWebMD.getEnvironmentEntries();
// iterate through all POJO endpoints
for (Endpoint endpoint : dep.getService().getEndpoints())
{
// build POJO injections meta data
final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(envEntriesMD, resolvers);
// associate injections meta data with POJO endpoint
endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
}
}
else if (WSHelper.isJaxwsEjbDeployment(dep))
{
this.log.debug("Building injection meta data for JAXWS EJB3 webservice deployment: " + dep.getSimpleName());
final WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit,
WebServiceDeployment.class);
final Service service = dep.getService();
// iterate through all EJB3 endpoints
for (final WebServiceDeclaration container : webServiceDeployment.getServiceEndpoints())
{
final String ejbName = container.getComponentName();
final Endpoint endpoint = service.getEndpointByName(ejbName);
if (endpoint != null && ASHelper.isWebServiceBean(container))
{
// build EJB 3 injections meta data
final EnvironmentEntriesMetaData ejbEnvEntries = this.getEnvironmentEntries(ejbName, unit);
final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(ejbEnvEntries, resolvers);
// associate injections meta data with EJB 3 endpoint
endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
}