use of org.jboss.wsf.spi.metadata.j2ee.EJBMetaData in project wildfly by wildfly.
the class AbstractSecurityMetaDataAccessorEJB method getEjbSecurityMetaData.
/**
* Gets EJB security meta data if associated with EJB endpoint.
*
* @param endpoint EJB webservice endpoint
* @return EJB security meta data or null
*/
private EJBSecurityMetaData getEjbSecurityMetaData(final Endpoint endpoint) {
final String ejbName = endpoint.getShortName();
final Deployment dep = endpoint.getService().getDeployment();
final EJBArchiveMetaData ejbArchiveMD = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;
return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
}
use of org.jboss.wsf.spi.metadata.j2ee.EJBMetaData 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);
}
Aggregations