Package org.ow2.asm

Examples of org.ow2.asm.FieldVisitor


             * Handle the event.
             * @param event The event to handle.
             */
            public synchronized void handle(final IEvent event) {
                if (EZBEventBeanInvocationBegin.class.isAssignableFrom(event.getClass())) {
                    EZBEventBeanInvocationBegin e = (EZBEventBeanInvocationBegin) event;
                    MeanCallTimeStatistic.this.pendingCall.put(Long.valueOf(e.getInvocationNumber()), e);
                } else {
                    EZBEventBeanInvocation eventEnd = (EZBEventBeanInvocation) event;
                    EZBEventBeanInvocation eventBegin =
                        MeanCallTimeStatistic.this.pendingCall.remove(Long.valueOf(eventEnd.getInvocationNumber()));

View Full Code Here


     * @param methodVisitor the given visitor on which annotation are replayed.
     */
    @Override
    public void replay(final MethodVisitor methodVisitor) {
        // Build a new annotation visitor for the given method
        AnnotationVisitor annotationVisitor = methodVisitor.visitParameterAnnotation(this.index, getName(), getVisible());
        getLogger().debug("AnnotationVisitor annotationVisitor = methodVisitor.visitParameterAnnotation({0}, {1}, {2});",
                Integer.valueOf(this.index), getName(), Boolean.valueOf(getVisible()));

        // Replay
        replayInner(annotationVisitor);

        // End of visit
        annotationVisitor.visitEnd();
        getLogger().debug("annotationVisitor.visitEnd();");
    }
View Full Code Here

            // Enable bindings into the cluster
            try {
                ConfigurationRepository.getServerConfiguration().enableCMI(this.cmiProperties);
            } catch (Exception e) {
                this.logger.error("Cannot configure Carol to use CMI", e);
                throw new EZBComponentException("Cannot configure Carol to use CMI", e);
            }

            ClusterViewManagerFactory clusterViewManagerFactory = ClusterViewManagerFactory.getFactory();

            // Start the manager
            try {
                this.clusterViewManager = (ServerClusterViewManager) clusterViewManagerFactory.create();
            } catch (Exception e) {
                this.logger.error("Cannot retrieve the CMI Server", e);
                throw new EZBComponentException("Cannot retrieve the CMI Server", e);
            }
            if (this.clusterViewManager != null
                    && this.clusterViewManager.getState().equals(ClusterViewManager.State.STOPPED)) {
                if (this.eventComponent != null) {
                    List<Component> components =
                        clusterViewManagerFactory.getConfig().getComponents().getComponents();
                    if (components != null) {
                        for (Component cmiEventComponent : components) {
                            if (org.ow2.cmi.component.event.EventComponent.class.isAssignableFrom(cmiEventComponent.getClass())) {
                                ((org.ow2.cmi.component.event.EventComponent) cmiEventComponent).setEventService(
                                        this.eventComponent.getEventService());
                            }
                        }
                    }
                }
                try {
                    this.clusterViewManager.start();
                } catch (Exception e) {
                    this.logger.error("Cannot start the CMI Server", e);
                    throw new EZBComponentException("Cannot start the CMI Server", e);
                }
            }
        }
        // register the listener.
        EZBEventListener eventListener = new CmiEventListener();
View Full Code Here

            if (this.clusterViewManager != null) {
                try {
                    this.clusterViewManager.stop();
                } catch (Exception e) {
                    this.logger.error("Cannot stop the server-side manager", e);
                    throw new EZBComponentException("Cannot stop the server-side manager", e);
                }
            }
        }
        this.logger.info("CMI extension stopped.");
View Full Code Here

        } else {
            throw new EZBContainerException("unknown session type for: " + sessionBean);
        }

        // Build runtime information
        SessionBeanInfo sessionBeanInfo = new SessionBeanInfo();
        sessionBeanInfo.setTransactionManagementType(sessionBean.getTransactionManagementType());
        sessionBeanInfo.setApplicationExceptions(sessionBean.getEjbJarDeployableMetadata().getApplicationExceptions());
        // Only for singleton
        if (sessionBean.isSingleton()) {
            sessionBeanInfo.setStartup(sessionBean.isStartup());
        }

        sessionFactory.setSessionBeanInfo(sessionBeanInfo);

        // Build WS deploy/time info
        if (sessionBean.getWebServiceMarker() != null) {
            // Bean is annotated with @WebService or @WebServiceprovider
            IWebServiceInfo info = createWebServiceInfo(sessionBean, factoryName);
            sessionBeanInfo.setWebServiceInfo(info);
        } // else this bean is not webservices annotated

        // get interfaces of bean
        IJLocal localItfs = sessionBean.getLocalInterfaces();
        IJRemote remoteItfs = sessionBean.getRemoteInterfaces();

        if (localItfs != null) {
            sessionBeanInfo.setLocalInterfaces(localItfs.getInterfaces());
            for (String itf : localItfs.getInterfaces()) {
                this.bindingReferences.add(createLocalItfRef(itf,
                                                             getEmbedded().getID(),
                                                             getId(),
                                                             factoryName,
                                                             sessionBean,
                                                             sessionFactory));
            }
        }
        if (remoteItfs != null) {
            sessionBeanInfo.setRemoteInterfaces(remoteItfs.getInterfaces());
            for (String itf : remoteItfs.getInterfaces()) {
                this.bindingReferences.add(createRemoteItfRef(itf,
                                                              getId(),
                                                              factoryName,
                                                              sessionBean,
View Full Code Here

                    }
                }
            }

            // Fill the Info structure
            WebServiceInfo info = new WebServiceInfo();

            // Read name
            info.setPortComponentName(name);

            if (portComponent != null) {

                // Read wsdl-location from the webservice-description parent element
                info.setWsdlLocation(portComponent.getParent().getWsdlFile());

                // Read service QName
                info.setServiceName(portComponent.getWsdlService());

                // Read port QName
                info.setPortName(portComponent.getWsdlPort());

                // Read protocol-binding
                info.setProtocolBinding(portComponent.getProtocolBinding());

                // Read enable-mtom
                info.setMTOMEnabled(portComponent.isMTOMEnabled());

                // Read service-endpoint-interface
                if  (!marker.isWebServiceProvider()) {
                    info.setServiceEndpointInterface(portComponent.getServiceEndpointInterface());
                }

                // Read HandlerChains
                info.setHandlerChains(portComponent.getHandlerChains());

            }

            // EasyBeans specific values ....
            // ---------------------------------------------------
            // manage endpoint-address
            info.setEndpointAddress(sessionBean.getWebServiceEndpointAddress());

            // manage context-root
            info.setContextRoot(sessionBean.getWebServiceContextRoot());

            // manage realm-name
            info.setRealmName(sessionBean.getWebServiceRealmName());

            // manage transport-guarantee
            info.setTransportGuarantee(sessionBean.getWebServiceTransportGuarantee());

            // manage auth-method
            info.setAuthMethod(sessionBean.getWebServiceAuthMethod());

            // manage http-methods
            info.setHttpMethods(sessionBean.getWebServiceHttpMethods());

            // manage wsdl-publication-directory
            if (endpoint != null) {
                info.setWsdlPublicationDirectory(endpoint.getWsdlPublicationDirectory());
            }

            return info;
        }
View Full Code Here

        // Get JMS Component
        JMSComponent jmsComponent = null;
        jmsComponent = getEmbedded().getComponent(JMSComponent.class);

        // Create factory
        MDBMessageEndPointFactory mdbMessageEndPointFactory = null;
        try {
            mdbMessageEndPointFactory = new MDBMessageEndPointFactory(className, this, activationSpec, resourceAdapter,
                    jmsComponent);
        } catch (FactoryException e) {
            throw new EZBContainerException("Cannot build the MDB MessageEndPoint factory", e);
        }

        // build runtime information
        MessageDrivenInfo messageDrivenInfo = new MessageDrivenInfo();
        messageDrivenInfo.setApplicationExceptions(messageDrivenBean.getEjbJarDeployableMetadata().getApplicationExceptions());
        messageDrivenInfo.setTransactionManagementType(messageDrivenBean.getTransactionManagementType());
        messageDrivenInfo.setMessageListenerInterface(messageDrivenBean.getJMessageDriven()
                .getMessageListenerInterface());
        messageDrivenInfo.setMessageDestinationLink(messageDrivenBean.getJMessageDriven()
                .getMessageDestinationLink());

        // MappedName ? use it as destination
        String mappedName = messageDrivenBean.getJCommonBean().getMappedName();
        if (mappedName != null && !"".equals(mappedName)) {
            messageDrivenBean.getJMessageDriven().getActivationConfigProperties().add(
                    new JActivationConfigProperty("destination", mappedName));
        }

        messageDrivenInfo.setActivationConfigProperties(messageDrivenBean.getJMessageDriven()
                .getActivationConfigProperties());
        mdbMessageEndPointFactory.setMessageDrivenInfo(messageDrivenInfo);



        return mdbMessageEndPointFactory;
View Full Code Here

            } catch (FactoryException fe) {
                throw new EZBContainerException("Cannot build the stateful factory", fe);
            }
        } else if (sessionBean.isSingleton()) {
            try {
                sessionFactory = new SingletonSessionFactory(className, this);
            } catch (FactoryException fe) {
                throw new EZBContainerException("Cannot build the stateful factory", fe);
            }
        } else {
            throw new EZBContainerException("unknown session type for: " + sessionBean);
View Full Code Here

            // Get meta data of the super class
            EasyBeansEjbJarClassMetadata superClassMetadata = beanclassAnnotationMetadata.getLinkedClassMetadata(superClass);

            if (superClassMetadata == null) {
                // TODO : I18n
                throw new ResolverException("The class " + beanclassAnnotationMetadata + " extends the class " + superClass
                        + "but this class seems to be outside of the ejb-jar");
            }

            // Takes method metadata of the super class and adds them to the
            // bean class
View Full Code Here

            if (superClass.equals(JAVA_LANG_OBJECT)) {
                return;
            }

            // Get meta data of the super class
            EasyBeansEjbJarClassMetadata superClassMetadata = beanclassAnnotationMetadata.getLinkedClassMetadata(superClass);

            if (superClassMetadata == null) {
                // TODO : I18n
                throw new ResolverException("The class " + beanclassAnnotationMetadata + " extends the class " + superClass
                        + "but this class seems to be outside of the ejb-jar");
            }

            // Takes method metadata of the super class and adds them to the
            // bean class
            // Note : the flag inherited is set to true
            for (EasyBeansEjbJarMethodMetadata methodAnnotationMetadata : superClassMetadata.getMethodMetadataCollection()) {
                // check that the method has not be redefined
                JMethod method = methodAnnotationMetadata.getJMethod();

                EasyBeansEjbJarMethodMetadata beanMethod = beanclassAnnotationMetadata.getMethodMetadata(method);
View Full Code Here

TOP

Related Classes of org.ow2.asm.FieldVisitor

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.