Package org.jboss.metadata.ejb.spec

Examples of org.jboss.metadata.ejb.spec.AssemblyDescriptorMetaData


      ApplicationExceptionMetaData applicationException = create(type);
      if(applicationException == null)
         return;
     
      if(ejbJar.getAssemblyDescriptor() == null)
         ejbJar.setAssemblyDescriptor(new AssemblyDescriptorMetaData());
      if(ejbJar.getAssemblyDescriptor().getApplicationExceptions() == null)
         ejbJar.getAssemblyDescriptor().setApplicationExceptions(new ApplicationExceptionsMetaData());
     
      ejbJar.getAssemblyDescriptor().getApplicationExceptions().add(applicationException);
   }
View Full Code Here


        final String ejbName = description.getEJBName();
        final EjbJarMetaData metaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
        if (metaData == null) {
            return;
        }
        final AssemblyDescriptorMetaData assemblyDescriptor = metaData.getAssemblyDescriptor();
        if (assemblyDescriptor == null) {
            return;
        }
        // get the pool metadata
        final List<EJBBoundCacheMetaData> caches = assemblyDescriptor.getAny(EJBBoundCacheMetaData.class);

        String cacheName = null;
        if (caches != null) {
            for (final EJBBoundCacheMetaData cacheMetaData : caches) {
                // if this applies for all EJBs and if there isn't a pool name already explicitly specified
View Full Code Here

        //now add the exceptions from the assembly descriptor
        EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
        if (ejbJarMetaData != null) {
            // process assembly-descriptor stuff
            AssemblyDescriptorMetaData assemblyDescriptor = ejbJarMetaData.getAssemblyDescriptor();
            if (assemblyDescriptor != null) {
                // process application-exception(s)
                ApplicationExceptionsMetaData ddAppExceptions = assemblyDescriptor.getApplicationExceptions();
                if (ddAppExceptions != null && !ddAppExceptions.isEmpty()) {
                    for (ApplicationExceptionMetaData applicationException : ddAppExceptions) {
                        String exceptionClassName = applicationException.getExceptionClass();
                        try {
                            final ClassIndex index = classIndex.classIndex(exceptionClassName);
View Full Code Here

        EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
        if (ejbJarMetaData == null) {
            return;
        }
        // process assembly-descriptor stuff
        AssemblyDescriptorMetaData assemblyDescriptor = ejbJarMetaData.getAssemblyDescriptor();
        if (assemblyDescriptor != null) {
            // get hold of the ejb jar description (to which we'll be adding this assembly description metadata)
            final EjbJarDescription ejbJarDescription = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION);
            // process application-exception(s)
            ApplicationExceptionsMetaData applicationExceptions = assemblyDescriptor.getApplicationExceptions();
            if (applicationExceptions != null && !applicationExceptions.isEmpty()) {
                for (ApplicationExceptionMetaData applicationException : applicationExceptions) {
                    String exceptionClassName = applicationException.getExceptionClass();
                    boolean rollback = applicationException.isRollback();
                    // by default inherited is true
View Full Code Here

        EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
        if (ejbJarMetaData == null) {
            return;
        }
        // process assembly-descriptor stuff
        AssemblyDescriptorMetaData assemblyDescriptor = ejbJarMetaData.getAssemblyDescriptor();
        if (assemblyDescriptor != null) {
            // get hold of the ejb jar description (to which we'll be adding this assembly description metadata)
            final EjbJarDescription ejbJarDescription = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION);
            // process application-exception(s)
            ApplicationExceptionsMetaData applicationExceptions = assemblyDescriptor.getApplicationExceptions();
            if (applicationExceptions != null && !applicationExceptions.isEmpty()) {
                for (ApplicationExceptionMetaData applicationException : applicationExceptions) {
                    String exceptionClassName = applicationException.getExceptionClass();
                    boolean rollback = applicationException.isRollback();
                    // by default inherited is true
                    boolean inherited = applicationException.isInherited() == null ? true : applicationException.isInherited();
                    // add the application exception to the ejb jar description
                    ejbJarDescription.addApplicationException(exceptionClassName, rollback, inherited);
                }
            }

            // process security-role(s)
            this.processSecurityRoles(assemblyDescriptor.getSecurityRoles(), ejbJarDescription);
        }
    }
View Full Code Here

    }

    @Override
    protected void processBeanMetaData(EnterpriseBeanMetaData beanMetaData, DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final String ejbName = beanMetaData.getEjbName();
        final AssemblyDescriptorMetaData assemblyDescriptor = beanMetaData.getAssemblyDescriptor();
        if (assemblyDescriptor == null) {
            return;
        }
        final ExcludeListMetaData excludeList = assemblyDescriptor.getExcludeListByEjbName(ejbName);
        if (excludeList == null) {
            return;
        }
        final MethodsMetaData methods = excludeList.getMethods();
        if (methods == null || methods.isEmpty()) {
View Full Code Here

    }

    @Override
    protected void processBeanMetaData(EnterpriseBeanMetaData beanMetaData, DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final String ejbName = beanMetaData.getEjbName();
        final AssemblyDescriptorMetaData assemblyDescriptor = beanMetaData.getAssemblyDescriptor();
        if (assemblyDescriptor == null) {
            return;
        }
        final MethodPermissionsMetaData methodPermissions = assemblyDescriptor.getMethodPermissionsByEjbName(ejbName);
        if (methodPermissions == null || methodPermissions.isEmpty()) {
            return;
        }
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   public void merge(JBossAssemblyDescriptorMetaData override, IAssemblyDescriptorMetaData assembly)
/*     */   {
/* 461 */     AssemblyDescriptorMetaData original = (AssemblyDescriptorMetaData)assembly;
/* 462 */     merge(override, original);
/*     */   }
View Full Code Here

/* 71 */       return;
/*    */     }
/* 73 */     IEjbJarMetaData ejbJarMetaData = bean.getEjbJarMetaData();
/*    */
/* 75 */     if (ejbJarMetaData.getAssemblyDescriptor() == null)
/* 76 */       ejbJarMetaData.setAssemblyDescriptor(new AssemblyDescriptorMetaData());
/* 77 */     if (ejbJarMetaData.getAssemblyDescriptor().getContainerTransactions() == null) {
/* 78 */       ejbJarMetaData.getAssemblyDescriptor().setContainerTransactions(new ContainerTransactionsMetaData());
/*    */     }
/* 80 */     ContainerTransactionMetaData transaction = createContainerTransaction(bean.getEjbName(), annotation, element);
/* 81 */     ejbJarMetaData.getAssemblyDescriptor().getContainerTransactions().add(transaction);
View Full Code Here

/*  95 */       ejbJarMetaData.setEnterpriseBeans(new EnterpriseBeansMetaData());
/*     */     }
/*  97 */     ejbJarMetaData.getEnterpriseBeans().add(beanMetaData);
/*  98 */     processClass(beanMetaData, beanClass);
/*     */
/* 100 */     AssemblyDescriptorMetaData assembly = ejbJarMetaData.getAssemblyDescriptor();
/* 101 */     if (assembly == null)
/*     */     {
/* 103 */       assembly = new AssemblyDescriptorMetaData();
/* 104 */       ejbJarMetaData.setAssemblyDescriptor(assembly);
/*     */     }
/*     */
/* 107 */     SecurityRolesMetaData securityRoles = assembly.getSecurityRoles();
/* 108 */     if (securityRoles == null)
/*     */     {
/* 110 */       securityRoles = new SecurityRolesMetaData();
/* 111 */       assembly.setSecurityRoles(securityRoles);
/*     */     }
/* 113 */     super.processClass(securityRoles, beanClass);
/*     */
/* 115 */     ExcludeListMetaData excludes = assembly.getExcludeList();
/* 116 */     if (excludes == null)
/*     */     {
/* 118 */       excludes = new ExcludeListMetaData();
/* 119 */       assembly.setExcludeList(excludes);
/*     */     }
/* 121 */     super.processClass(excludes, beanClass);
/*     */
/* 124 */     MethodPermissionsMetaData permissions = assembly.getMethodPermissions();
/* 125 */     if (permissions == null)
/*     */     {
/* 127 */       permissions = new MethodPermissionsMetaData();
/* 128 */       assembly.setMethodPermissions(permissions);
/*     */     }
/* 130 */     super.processClass(permissions, beanClass);
/*     */
/* 133 */     InterceptorBindingsMetaData interceptors = assembly.getInterceptorBindings();
/* 134 */     if (interceptors == null)
/*     */     {
/* 136 */       interceptors = new InterceptorBindingsMetaData();
/* 137 */       assembly.setInterceptorBindings(interceptors);
/*     */     }
/* 139 */     super.processClass(interceptors, beanClass);
/*     */
/* 141 */     EjbNameThreadLocal.ejbName.set(null);
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ejb.spec.AssemblyDescriptorMetaData

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.