Search in sources :

Example 1 with EJBArchiveMetaData

use of org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData in project wildfly by wildfly.

the class AbstractSecurityMetaDataAccessorEJB method getEjbSecurityMetaData.

/**
 * Gets Jakarta Enterprise Beans security meta data if associated with Jakarta Enterprise Beans 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;
}
Also used : EJBMetaData(org.jboss.wsf.spi.metadata.j2ee.EJBMetaData) Deployment(org.jboss.wsf.spi.deployment.Deployment) EJBArchiveMetaData(org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData)

Example 2 with EJBArchiveMetaData

use of org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData in project wildfly by wildfly.

the class ContainerMetaDataDeploymentAspect method start.

@Override
public void start(final Deployment dep) {
    if (WSHelper.isJaxwsJseDeployment(dep) && WSHelper.hasAttachment(dep, JBossWebMetaData.class)) {
        if (WSLogger.ROOT_LOGGER.isTraceEnabled()) {
            WSLogger.ROOT_LOGGER.tracef("Creating JBoss agnostic JAXWS POJO meta data for deployment: %s", dep.getSimpleName());
        }
        final JSEArchiveMetaData jseMetaData = jaxwsPojoMDBuilder.create(dep);
        dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
    }
    if (WSHelper.isJaxwsEjbDeployment(dep)) {
        if (WSLogger.ROOT_LOGGER.isTraceEnabled()) {
            WSLogger.ROOT_LOGGER.tracef("Creating JBoss agnostic JAXWS EJB meta data for deployment: %s", dep.getSimpleName());
        }
        final EJBArchiveMetaData ejbMetaData = jaxwsEjbMDBuilder.create(dep);
        dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
    }
}
Also used : JBossWebMetaData(org.jboss.metadata.web.jboss.JBossWebMetaData) JSEArchiveMetaData(org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData) EJBArchiveMetaData(org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData)

Aggregations

EJBArchiveMetaData (org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData)2 JBossWebMetaData (org.jboss.metadata.web.jboss.JBossWebMetaData)1 Deployment (org.jboss.wsf.spi.deployment.Deployment)1 EJBMetaData (org.jboss.wsf.spi.metadata.j2ee.EJBMetaData)1 JSEArchiveMetaData (org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData)1