Search in sources :

Example 1 with EJBMetaData

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;
}
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 EJBMetaData

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);
}
Also used : EJBMetaData(org.jboss.wsf.spi.metadata.j2ee.EJBMetaData) JBossWebMetaData(org.jboss.metadata.web.jboss.JBossWebMetaData) JSEArchiveMetaData(org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData) JBossWebservicesMetaData(org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData) EJBEndpoint(org.jboss.as.webservices.metadata.model.EJBEndpoint) JAXWSDeployment(org.jboss.as.webservices.metadata.model.JAXWSDeployment) LinkedList(java.util.LinkedList)

Aggregations

EJBMetaData (org.jboss.wsf.spi.metadata.j2ee.EJBMetaData)2 LinkedList (java.util.LinkedList)1 EJBEndpoint (org.jboss.as.webservices.metadata.model.EJBEndpoint)1 JAXWSDeployment (org.jboss.as.webservices.metadata.model.JAXWSDeployment)1 JBossWebMetaData (org.jboss.metadata.web.jboss.JBossWebMetaData)1 Deployment (org.jboss.wsf.spi.deployment.Deployment)1 EJBArchiveMetaData (org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData)1 JSEArchiveMetaData (org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData)1 JBossWebservicesMetaData (org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData)1