Package org.jboss.ejb

Examples of org.jboss.ejb.TransactionManagementImpl


      if (enterpriseBean != null)
      {
         TransactionManagementType transactionType = enterpriseBean.getTransactionType();
         if (transactionType != null)
         {
            TransactionManagementImpl annotation = new TransactionManagementImpl();
            annotation.setValue(transactionType);
            addClassAnnotation(container, TransactionManagement.class, annotation);
         }

         MethodAttributesMetaData attributes = enterpriseBean.getMethodAttributes();
         if (attributes != null)
         {
            for(MethodAttributeMetaData method : attributes)
            {
               TransactionTimeout timeoutAnnotation = new TransactionTimeoutImpl(method.getTransactionTimeout());
               addAnnotations(TransactionTimeout.class, timeoutAnnotation, container, method.getMethodName(), null);
            }
         }
      }

      JBossAssemblyDescriptorMetaData descriptor = dd.getAssemblyDescriptor();
      if (descriptor != null && descriptor.getContainerTransactions() != null)
      {
         for(ContainerTransactionMetaData transaction : descriptor.getContainerTransactions())
         {
            for(MethodMetaData method : transaction.getMethods())
            {
               if (method.getEjbName().equals(ejbName))
               {
                  TransactionAttributeImpl annotation = new TransactionAttributeImpl();
                  annotation.setType(transaction.getTransAttribute());
                  addAnnotations(TransactionAttribute.class, annotation, container, method);
               }
            }
         }
      }
View Full Code Here


/* 1144 */     if (enterpriseBean != null)
/*      */     {
/* 1146 */       TransactionManagementType transactionType = enterpriseBean.getTransactionType();
/* 1147 */       if (transactionType != null)
/*      */       {
/* 1149 */         TransactionManagementImpl annotation = new TransactionManagementImpl();
/* 1150 */         annotation.setValue(transactionType);
/* 1151 */         addClassAnnotation(container, TransactionManagement.class, annotation);
/*      */       }
/*      */
/* 1154 */       MethodAttributesMetaData attributes = enterpriseBean.getMethodAttributes();
/* 1155 */       if (attributes != null)
/*      */       {
/* 1157 */         for (MethodAttributeMetaData method : attributes)
/*      */         {
/* 1159 */           TransactionTimeout timeoutAnnotation = new TransactionTimeoutImpl(method.getTransactionTimeout());
/* 1160 */           addAnnotations(TransactionTimeout.class, timeoutAnnotation, container, method.getMethodName(), null);
/*      */         }
/*      */       }
/*      */     }
/*      */
/* 1165 */     JBossAssemblyDescriptorMetaData descriptor = this.dd.getAssemblyDescriptor();
/*      */     Iterator i$;
/* 1166 */     if ((descriptor != null) && (descriptor.getContainerTransactions() != null))
/*      */     {
/* 1168 */       for (i$ = descriptor.getContainerTransactions().iterator(); i$.hasNext(); ) { transaction = (ContainerTransactionMetaData)i$.next();
/*      */
/* 1170 */         for (MethodMetaData method : transaction.getMethods())
/*      */         {
/* 1172 */           if (method.getEjbName().equals(ejbName))
/*      */           {
/* 1174 */             TransactionAttributeImpl annotation = new TransactionAttributeImpl();
/* 1175 */             annotation.setType(transaction.getTransAttribute());
/* 1176 */             addAnnotations(TransactionAttribute.class, annotation, container, method);
/*      */           }
/*      */         }
/*      */       }
/*      */     }
View Full Code Here

TOP

Related Classes of org.jboss.ejb.TransactionManagementImpl

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.