Package org.ow2.easybeans.deployment.metadata.ejbjar.xml

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.xml.EasyBeansDD


        if (remoteHome == null && localHome == null) {
            return;
        }

        // EJB-JAR
        EjbJarArchiveMetadata ejbJarAnnotationMetadata = bean.getEjbJarDeployableMetadata();
        // List of interfaces found in remote home interfaces.
        List<String> interfacesList = new ArrayList<String>();

        // Get List of Interfaces from remote home
        if (remoteHome != null) {
View Full Code Here


        // Wrap in a try/finally block to be able to stop/unregister the dispatcher afterall
        try {
            this.ejbJarInfo = new EJBJarInfo();
            // bind session beans
            EjbJarArchiveMetadata ejbMetadata = this.deployment.getEjbJarArchiveMetadata();
            if (ejbMetadata != null) {
                List<String> beanNames = this.deployment.getEjbJarArchiveMetadata().getBeanNames();
                for (String beanName : beanNames) {
                    for (EasyBeansEjbJarClassMetadata classAnnotationMetadata : this.deployment.getEjbJarArchiveMetadata()
                            .getClassesForBean(beanName)) {
View Full Code Here

    protected String getActivationSpec(final EasyBeansEjbJarClassMetadata mdbMetadata) {
        String activationSpec = null;

        EasyBeansDD easybeansDD = this.deployment.getEjbJarArchiveMetadata().getEasyBeansDD();
        if (easybeansDD != null) {
            EJB ejb = easybeansDD.getEJB();
            if (ejb != null) {
                // get MDB
                List<MessageDrivenBean> mdbList = ejb.getMessageDrivenBeans();
                if (mdbList != null) {
                    for (MessageDrivenBean mdb : mdbList) {
                        if (mdb.getEjbName().equals(mdbMetadata.getJCommonBean().getName())) {
                            String mdbActivationSpec = mdb.getActivationSpec();
                            if (mdbActivationSpec != null) {
View Full Code Here

     * @return the activation spec value or the default one if no activation spec was specified
     */
    protected String getActivationSpec(final EasyBeansEjbJarClassMetadata mdbMetadata) {
        String activationSpec = null;

        EasyBeansDD easybeansDD = this.deployment.getEjbJarArchiveMetadata().getEasyBeansDD();
        if (easybeansDD != null) {
            EJB ejb = easybeansDD.getEJB();
            if (ejb != null) {
                // get MDB
                List<MessageDrivenBean> mdbList = ejb.getMessageDrivenBeans();
                if (mdbList != null) {
                    for (MessageDrivenBean mdb : mdbList) {
View Full Code Here

            }
        }

        // Use info from easybeans.xml if available
        WebserviceEndpoint endpoint = null;
        EasyBeansDD easybeansDD = this.deployment.getEjbJarArchiveMetadata().getEasyBeansDD();
        if (easybeansDD != null) {

            // Iterates on additional datas
            EasyBeansWebservices webservices = easybeansDD.getWebservices();
            if ((webservices != null) && (webservices.getWebserviceEndpoints() != null)) {

                Iterator<WebserviceEndpoint> i = webservices.getWebserviceEndpoints().iterator();
                for (; i.hasNext() && (endpoint == null);) {
                    WebserviceEndpoint browsed = i.next();
View Full Code Here

    /**
     * Do all merging operations.
     */
    private void resolve() {
        EasyBeansDD easybeansDD = this.ejbMetadata.getEasyBeansDD();
        if (easybeansDD != null) {
            logger.debug("There is a specific Deployment Descriptor object, performing the merge of the metadata.");
            // Analyze EJBs
            EJB ejb = easybeansDD.getEJB();
            if (ejb != null) {

                // get session beans
                List<Session> sessionList = ejb.getSessions();
                if (sessionList != null) {
View Full Code Here

    /**
     * This method is called before metadata is filled.
     */
    @Override
    public void beforeScan(final EjbJarArchiveMetadata ejbJarArchiveMetadata) {
        EasyBeansDD easyBeansDD = null;
        try {
          easyBeansDD = EasyBeansDeploymentDesc.getEasyBeansDD(ejbJarArchiveMetadata.getDeployable().getArchive());
        } catch (ParsingException e) {
            logger.warn("Exception during parsing of easybeans.xml ", e);
            easyBeansDD = null;
View Full Code Here

        // By default, build the principal with the run-as role value
        Principal principal = new JPrincipal(this.runAsRole);

        // Get the EasyBeans DD
        EasyBeansDD easyBeansDD = this.bean.getEjbJarDeployableMetadata().getEasyBeansDD();
        if (easyBeansDD != null) {
            // Get the current bean name
            String beanName = this.bean.getJCommonBean().getName();

            // For each declared session bean
            List<Session> sessions = easyBeansDD.getEJB().getSessions();
            for (Session session : sessions) {
                String ejbName = session.getEjbName();

                // Found the bean to analyze
                if (beanName.equals(ejbName)) {
                    RunAs runAs = session.getRunAs();
                    if (runAs != null) {
                        // Found the principal name to use with the current bean
                        String beanPincipalName = runAs.getPrincipalName();
                        principal = new JPrincipal(beanPincipalName);

                        // Read security role mappings to get all roles for the principal name identity
                        for (SecurityRoleMapping securityRoleMapping : easyBeansDD.getSecurityRoleMappings()) {
                            for (String pincipalName : securityRoleMapping.getPrincipalNames()) {
                                if (beanPincipalName.equals(pincipalName)) {
                                    principals.add(new JPrincipal(securityRoleMapping.getRoleName()));
                                }
                            }
View Full Code Here

        WebserviceEndpoint endpoint = null;
        EasyBeansDD easybeansDD = this.deployment.getEjbJarArchiveMetadata().getEasyBeansDD();
        if (easybeansDD != null) {

            // Iterates on additional datas
            EasyBeansWebservices webservices = easybeansDD.getWebservices();
            if ((webservices != null) && (webservices.getWebserviceEndpoints() != null)) {

                Iterator<WebserviceEndpoint> i = webservices.getWebserviceEndpoints().iterator();
                for (; i.hasNext() && (endpoint == null);) {
                    WebserviceEndpoint browsed = i.next();

                    if (browsed.getPortComponentName().equals(name)) {
                        endpoint = browsed;
View Full Code Here

                name = portComponent.getName();
            }
        }

        // Use info from easybeans.xml if available
        WebserviceEndpoint endpoint = null;
        EasyBeansDD easybeansDD = this.deployment.getEjbJarArchiveMetadata().getEasyBeansDD();
        if (easybeansDD != null) {

            // Iterates on additional datas
            EasyBeansWebservices webservices = easybeansDD.getWebservices();
            if ((webservices != null) && (webservices.getWebserviceEndpoints() != null)) {

                Iterator<WebserviceEndpoint> i = webservices.getWebserviceEndpoints().iterator();
                for (; i.hasNext() && (endpoint == null);) {
                    WebserviceEndpoint browsed = i.next();

                    if (browsed.getPortComponentName().equals(name)) {
                        endpoint = browsed;
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.ow2.easybeans.deployment.metadata.ejbjar.xml.EasyBeansDD

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.