Package javax.ejb

Examples of javax.ejb.TransactionManagementType


         descriptionGroup.setDescriptions(descriptions);
         bean.setDescriptionGroup(descriptionGroup);
      }

      TransactionManagement txMgmt = finder.getAnnotation(beanClass, TransactionManagement.class);
      TransactionManagementType txType = TransactionManagementType.CONTAINER;
      if(txMgmt != null)
         txType = txMgmt.value();
      bean.setTransactionType(txType);
     
      return bean;
View Full Code Here


    *
    * @return true when CMT
    */
   public boolean isCMT()
   {
      TransactionManagementType type = getTransactionType();
      if (type == null)
         return true;
      else
         return type == TransactionManagementType.CONTAINER;
   }
View Full Code Here

   private void addTransactionAnnotations(EJBContainer container, JBossEnterpriseBeanMetaData enterpriseBean, String ejbName)
      throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException
   {
      if (enterpriseBean != null)
      {
         TransactionManagementType transactionType = enterpriseBean.getTransactionType();
         if (transactionType != null)
         {
            TransactionManagementImpl annotation = new TransactionManagementImpl();
            annotation.setValue(transactionType);
            addClassAnnotation(container, TransactionManagement.class, annotation);
View Full Code Here

                /*
                 * @TransactionManagement
                 */
                if (bean.getTransactionType() == null) {
                    TransactionManagement tx = getInheritableAnnotation(clazz, TransactionManagement.class);
                    TransactionManagementType transactionType = TransactionManagementType.CONTAINER;
                    if (tx != null) {
                        transactionType = tx.value();
                    }
                    switch (transactionType) {
                        case BEAN:
View Full Code Here

                processCallbacks(bean, inheritedClassFinder);

                if (bean.getTransactionType() == null) {
                    TransactionManagement tx = clazz.getAnnotation(TransactionManagement.class);
                    TransactionManagementType transactionType = TransactionManagementType.CONTAINER;
                    if (tx != null) {
                        transactionType = tx.value();
                    }
                    switch (transactionType) {
                        case BEAN:
View Full Code Here

      throw new RuntimeException("NYI: org.jboss.ejb3.tx2.aop.CMTTxInterceptorFactory.createPerVM");
   }

   public Object createPerClass(Advisor advisor)
   {
      TransactionManagementType txManagementType = this.getTransactionManagementType(advisor);
      // if it's not CMT tx management, then just return a no-op interceptor
      if (txManagementType != TransactionManagementType.CONTAINER)
      {
         return new NoOpInterceptor();
      }
View Full Code Here

                /*
                 * @TransactionManagement
                 */
                if (bean.getTransactionType() == null) {
                    final TransactionManagement tx = getInheritableAnnotation(clazz, TransactionManagement.class);
                    TransactionManagementType transactionType = TransactionManagementType.CONTAINER;
                    if (tx != null) {
                        transactionType = tx.value();
                    }
                    switch (transactionType) {
                        case BEAN:
View Full Code Here

    @Override
    protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
        if(componentConfiguration.getDescriptorData() == null) {
            return;
        }
        final TransactionManagementType type = componentConfiguration.getDescriptorData().getTransactionType();
        if(type != null) {
            componentConfiguration.setTransactionManagementType(type);
        }
    }
View Full Code Here

      override.setTransactionType(TransactionManagementType.BEAN);

      // merged
      JBossSessionBeanMetaData merged = new JBossSessionBeanMetaData();
      merged.merge(override, original);
      TransactionManagementType txType = merged.getTransactionType();
      assertNotNull(txType);
      assertEquals(TransactionManagementType.BEAN, txType);
   }
View Full Code Here

    * @return true when CMT
    */
   @XmlTransient
   public boolean isCMT()
   {
      TransactionManagementType type = getTransactionType();
      if (type == null)
         return true;
      else
         return type == TransactionManagementType.CONTAINER;
   }
View Full Code Here

TOP

Related Classes of javax.ejb.TransactionManagementType

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.