Examples of EjbJarArchiveMetadata


Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

        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

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

        // 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

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

        ClassLoader loader = Thread.currentThread().getContextClassLoader();

        IArchive archive = new ArchiveInMemory(loader, classesToEnhance);

        EasyBeansEjbJarDeployableFactory deployableFactory = new EasyBeansEjbJarDeployableFactory();
        EjbJarArchiveMetadata ejbJarAnnotationMetadata = deployableFactory
                .createDeployableMetadata(EJB3Deployable.class.cast(DeployableHelper.getDeployable(archive)));


        ResolverHelper.resolve(ejbJarAnnotationMetadata, null);

        // Remove some TX interceptors (so it works offline)
        // For each bean class
        List<String> beanNames = ejbJarAnnotationMetadata.getBeanNames();
        for (String beanName : beanNames) {
            for (EasyBeansEjbJarClassMetadata classAnnotationMetadata : ejbJarAnnotationMetadata.getClassesForBean(beanName)) {
                if (classAnnotationMetadata.isBean()) {
                    // Remove global EasyBeans interceptors
                    classAnnotationMetadata.setGlobalEasyBeansInterceptors(null);
                    for (EasyBeansEjbJarMethodMetadata m : classAnnotationMetadata.getMethodMetadataCollection()) {
                        m.setInterceptors(null);
View Full Code Here

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

     * @param deployment to add to the resolver.
     */
    public void addDeployment(final Deployment deployment) {

        // Get metadata for jar file analyzed
        EjbJarArchiveMetadata ejbJarAnnotationMetadata = deployment.getEjbJarArchiveMetadata();

        // Get Archive
        IArchive archive = deployment.getArchive();

        // Extract URL from archive
View Full Code Here

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

    /**
     * Constructor.
     * @param ejbDeployable the deployable
     */
    public EasyBeansEjbJarDeployableMetadataConfigurator(final EJB3Deployable ejbDeployable) {
        super(new EjbJarArchiveMetadata(ejbDeployable));
    }
View Full Code Here

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

        }
        classAnnotationMetadata.setGlobalEasyBeansInterceptors(easyBeansGlobalInterceptors);


        // Default interceptors (only once as it is stored in the ejb metadata)
        EjbJarArchiveMetadata ejbJarDeployableMetadata = classAnnotationMetadata.getEjbJarDeployableMetadata();

        IJInterceptors defaultInterceptorsClasses = ejbJarDeployableMetadata.getDefaultInterceptorsClasses();
        Map<InterceptorType, List<? extends IJClassInterceptor>> mapDefaultInterceptors =
            ejbJarDeployableMetadata.getDefaultInterceptors();
        if (mapDefaultInterceptors == null && defaultInterceptorsClasses != null && defaultInterceptorsClasses.size() > 0) {
            Map<InterceptorType, List<? extends IJClassInterceptor>> defaultInterceptors =
                new HashMap<InterceptorType, List<? extends IJClassInterceptor>>();
            defaultInterceptors.putAll(getInterceptors(classAnnotationMetadata.getClassName(), classAnnotationMetadata,
                    defaultInterceptorsClasses.getClasses()));
            ejbJarDeployableMetadata.setDefaultInterceptors(defaultInterceptors);
        }


        // And then, set the user interceptors (found in external class)
        List<String> externalInterceptorsClasses = new ArrayList<String>();
View Full Code Here

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

     * @param bean bean to validate.
     */
    public static void validate(final EasyBeansEjbJarClassMetadata bean) {

        // Root metadata
        EjbJarArchiveMetadata ejbMetaData = bean.getEjbJarDeployableMetadata();

        // Interceptors in the bean
        if (bean.isBean()) {
            for (EasyBeansEjbJarMethodMetadata method : bean.getMethodMetadataCollection()) {

View Full Code Here

Examples of org.ow2.easybeans.deployment.metadata.ejbjar.EjbJarArchiveMetadata

                this.allInterceptors.add(interceptor);
            }
        }

        // Default interceptors (if they are not excluded) and that the interceptors haven't been ordered
        EjbJarArchiveMetadata ejbJarAnnotationMetadata = this.classAnnotationMetadata.getEjbJarDeployableMetadata();
        if (!this.classAnnotationMetadata.isOrderedInterceptors() && ejbJarAnnotationMetadata.getDefaultInterceptors() != null
                && !this.classAnnotationMetadata.isExcludedDefaultInterceptors()) {
            // Not excluded at method level too
            if (!this.methodAnnotationMetadata.isExcludedDefaultInterceptors()) {
                List<? extends IJClassInterceptor> defaultInterceptorslist =
                    ejbJarAnnotationMetadata.getDefaultInterceptors().get(this.interceptorType);
                if (defaultInterceptorslist != null) {
                    for (IJClassInterceptor interceptor : defaultInterceptorslist) {
                        this.allInterceptors.add(interceptor);
                    }
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.