Package org.ow2.easybeans.api.loader

Examples of org.ow2.easybeans.api.loader.EZBClassLoader


            String generatedClName = this.classAnnotationMetadata.getClassName()
                    + EasyBeansInvocationContextGenerator.SUFFIX_INTERCEPTOR_MANAGER;
            InterceptorManagerGenerator interceptorManagerGenerator = new InterceptorManagerGenerator(
                    this.classAnnotationMetadata.getEjbJarDeployableMetadata(), generatedClName, this.beanInterceptors);
            interceptorManagerGenerator.generate();
            DefinedClass dc = new DefinedClass(generatedClName.replace("/", "."), interceptorManagerGenerator.getBytes());
            // this class will be defined later on the classloader
            this.definedClasses.add(dc);

        }
    }
View Full Code Here


                if (!this.beanInterceptors.contains(interceptorClassName)) {
                    this.beanInterceptors.add(interceptorClassName);
                }
            }
        }
        DefinedClass dc = new DefinedClass(genInvCtx.getGeneratedClassName().replace("/", "."), genInvCtx.getBytes());
        // this class will be defined later on the classloader
        this.definedClasses.add(dc);
        this.generatedTypes.add(interceptorType);
        // generate method calling generated EasyBeansInvocationContext impl
        generateCallToInvocationContext(method, genInvCtx, interceptorType);
View Full Code Here

            resolve();
        }

        try {
            Thread.currentThread().setContextClassLoader(this.classLoader);
            Enhancer enhancer = new Enhancer(this.classLoader, this.deployment.getEjbJarArchiveMetadata(), this.enhancerMap);

            long tStartEnhancing = System.currentTimeMillis();
            try {
                enhancer.enhance();
            } catch (EnhancerException ee) {
                throw new EZBContainerException("Cannot run enhancer on archive '" + getName() + "'.", ee);
            } catch (RuntimeException e) {
                // Catch Exception as some exceptions can be runtime exception
                throw new EZBContainerException("Cannot run enhancer on archive '" + getName() + "'.", e);
View Full Code Here

                            beanInfo.setCluster(classAnnotationMetadata.getCluster());

                            // Set invocation context factor

                            if (Boolean.getBoolean("easybeans.dynamicinterceptors")) {
                              factory.setInvocationContextFactory(new EasyBeansInvocationContextFactory(classAnnotationMetadata,
                                   this.classLoader));
                            }
                            // Sets the bean info
                            this.ejbJarInfo.addBeanInfo(beanInfo);
View Full Code Here

        }

        // Needs to keep annotation for intercepted method
        if (this.classAnnotationMetadata.isBean()) {
            if (isInterceptedMethod(jMethod) || isInterceptorMethod(jMethod)) {
                MethodAdapterWithAnnotationRecorder methodAdapter = new MethodAdapterWithAnnotationRecorder(super.visitMethod(
                        newAccess, newName, desc, signature, exceptions));
                // keep annotations
                this.annotationsOfMethod.put(name + desc, methodAdapter.getAnnotationRecorders());
                this.parametersAnnotationsOfMethod.put(name + desc, methodAdapter.getParameterAnnotationRecorders());

                return methodAdapter;
            }
        }
        // Else only call super method
View Full Code Here

            logger.info("Container ''{0}'' [{1} SLSB, {2} SFSB, {3} MDB] started in {4} ms", getArchive().getName(),
                    Integer.valueOf(slsb), Integer.valueOf(sfsb), Integer.valueOf(mdb), Long.valueOf((System
                            .currentTimeMillis() - tStart)));
        }

        this.dispatcher.dispatch(new EventContainerStarted(this.j2eeManagedObjectId, getArchive(),
                                                           this.persistenceUnitManager, this.configuration));
        this.dispatcher.dispatch(new EventLifeCycleStarted(this.j2eeManagedObjectId));

        this.available = true;
View Full Code Here

            try {
                JPersistenceUnitInfo[] persistenceUnitInfos =
                        PersistenceXmlFileAnalyzer.analyzePersistenceXmlFile(getArchive());

                // Dispatch life cycle event.
                this.dispatcher.dispatch(new EventContainerStarting(this.j2eeManagedObjectId, getArchive(),
                                                                    persistenceUnitInfos, this.configuration));

                if (persistenceUnitInfos != null) {
                    analyzedPersistenceUnitManager =
                            PersistenceXmlFileAnalyzer.loadPersistenceProvider(persistenceUnitInfos, getClassLoader());
View Full Code Here

        } finally {
            Thread.currentThread().setContextClassLoader(old);
            this.classLoader = null;
        }
        // Dispatch lifecycle event.
        this.dispatcher.dispatch(new EventContainerStopped(this.j2eeManagedObjectId, getArchive(), this.configuration));
        this.dispatcher.dispatch(new EventLifeCycleStopped(this.j2eeManagedObjectId));

        // Unregister from statistic component.
        EZBStatisticComponent statisticComponent = getComponent(EZBStatisticComponent.class);
        if (statisticComponent != null) {
View Full Code Here

        // Must resolve again after it has been stopped
        this.resolved = false;

        this.dispatcher.dispatch(new EventLifeCycleStopping(this.j2eeManagedObjectId));
        this.dispatcher.dispatch(new EventContainerStopping(this.j2eeManagedObjectId, getArchive(), this.configuration));

        // Unregister resolver
        getEmbedded().getJNDIResolver().removeContainerResolver(this.configuration.getContainerJNDIResolver());

        // Unregister MBean
View Full Code Here

                        }
                    }
                }
                //Register clustered beans if necessary.
                eventDispatcher.dispatch(new EventLifeCycleClusteredBean(Embedded.NAMING_EXTENSION_POINT,
                        EZBClusteredBeanEvent.STARTING, this.bindingReferences));

                // Bind references only once
                bindReferences();
View Full Code Here

TOP

Related Classes of org.ow2.easybeans.api.loader.EZBClassLoader

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.