use of org.jboss.as.webservices.metadata.model.EJBEndpoint in project wildfly by wildfly.
the class MetaDataBuilderJAXWS_EJB method buildEnterpriseBeansMetaData.
@Override
protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder) {
if (!WSHelper.isJaxwsJseDeployment(dep)) {
// [AS7-1605] support
final JBossWebMetaData jbossWebMD = WSHelper.getOptionalAttachment(dep, JBossWebMetaData.class);
final String contextRoot = getContextRoot(dep, jbossWebMD);
if (contextRoot != null) {
final JSEArchiveMetaData.Builder jseArchiveMDBuilder = new JSEArchiveMetaData.Builder();
jseArchiveMDBuilder.setContextRoot(contextRoot);
dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMDBuilder.build());
}
}
final JAXWSDeployment jaxwsDeployment = WSHelper.getRequiredAttachment(dep, JAXWSDeployment.class);
final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
final JBossWebservicesMetaData jbossWebservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
for (final EJBEndpoint jbossEjbMD : jaxwsDeployment.getEjbEndpoints()) {
buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD, jbossWebservicesMD);
}
ejbArchiveMDBuilder.setEnterpriseBeans(wsEjbsMD);
}
use of org.jboss.as.webservices.metadata.model.EJBEndpoint in project wildfly by wildfly.
the class AbstractSecurityMetaDataAccessorEJB method getSecurityDomain.
/**
* @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
*
* @param dep webservice deployment
* @return security domain associated with EJB 3 deployment
*/
public String getSecurityDomain(final Deployment dep) {
String securityDomain = null;
for (final EJBEndpoint ejbEndpoint : getEjbEndpoints(dep)) {
String nextSecurityDomain = ejbEndpoint.getSecurityDomain();
if (nextSecurityDomain == null || nextSecurityDomain.isEmpty()) {
nextSecurityDomain = null;
}
securityDomain = getDomain(securityDomain, nextSecurityDomain);
}
if (securityDomain == null) {
final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
if (unit.getParent() != null) {
final EarMetaData jbossAppMD = unit.getParent().getAttachment(Attachments.EAR_METADATA);
return jbossAppMD instanceof JBossAppMetaData ? ((JBossAppMetaData) jbossAppMD).getSecurityDomain() : null;
}
}
return securityDomain;
}
Aggregations