Package org.ow2.asm.tree

Examples of org.ow2.asm.tree.InsnList


        if (allInterfaces.contains(SESSION_BEAN_INTERFACE)) {
            // first add dependency injection for setSessionContext method.
            JAnnotationResource jAnnotationResource = new JAnnotationResource();

            // add resource on setSessionContext method
            EasyBeansEjbJarMethodMetadata setCtxMethod = getMethod(sessionBean, SETSESSIONCONTEXT_METHOD, false,
                    SESSION_BEAN_INTERFACE);
            setCtxMethod.setJAnnotationResource(jAnnotationResource);


            // ejbRemove() method
            EasyBeansEjbJarMethodMetadata ejbRemoveMethod = getMethod(sessionBean, EJBREMOVE_METHOD, true, SESSION_BEAN_INTERFACE);
            ejbRemoveMethod.setPreDestroy(true);
            if (!sessionBean.getPreDestroyMethodsMetadata().contains(ejbRemoveMethod)) {
                sessionBean.addPreDestroyMethodMetadata(ejbRemoveMethod);
            }

            // ejbActivate() method
            EasyBeansEjbJarMethodMetadata ejbActivateMethod = getMethod(sessionBean, EJBACTIVATE_METHOD, true, SESSION_BEAN_INTERFACE);
            ejbRemoveMethod.setPostActivate(true);
            if (!sessionBean.getPostActivateMethodsMetadata().contains(ejbActivateMethod)) {
                sessionBean.addPostActivateMethodMetadata(ejbActivateMethod);
            }

            // ejbPassivate() method
            EasyBeansEjbJarMethodMetadata ejbPassivateMethod = getMethod(sessionBean, EJBPASSIVATE_METHOD, true,
                    SESSION_BEAN_INTERFACE);
            ejbRemoveMethod.setPrePassivate(true);
            if (!sessionBean.getPrePassivateMethodsMetadata().contains(ejbPassivateMethod)) {
                sessionBean.addPrePassivateMethodMetadata(ejbPassivateMethod);
            }
View Full Code Here


     */
    public static void resolve(final EasyBeansEjbJarClassMetadata sessionBean) {

        Iterator<EasyBeansEjbJarMethodMetadata> itMethods = sessionBean.getMethodMetadataCollection().iterator();
        while (itMethods.hasNext()) {
            EasyBeansEjbJarMethodMetadata method = itMethods.next();
            IJavaxJwsWebMethod webMethod = method.getJavaxJwsWebMethod();
            // Annotation present and not excluded
            if (webMethod != null && !webMethod.getExclude()) {
                method.setBusinessMethod(true);
            }
        }
    }
View Full Code Here

                if (itfMethod.getName().equals(CLASS_INIT) || itfMethod.getName().equals(CONST_INIT)) {
                    continue;
                }

                // take the method from the bean class
                EasyBeansEjbJarMethodMetadata beanMethod = beanclassAnnotationMetadata.getMethodMetadata(itfMethod);
                if (beanMethod == null) {
                    // TODO: I18n
                    throw new IllegalStateException("No method was found for method " + itfMethod + " in class "
                            + beanclassAnnotationMetadata.getClassName());
                }
                beanMethod.setBusinessMethod(true);
            }

            // loop again
            if (itfMetadata.getInterfaces() != null) {
                loop(beanclassAnnotationMetadata, itfMetadata, visitedInterfaces);
View Full Code Here

        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

        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.asm.tree.InsnList

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.