Package javax.persistence.spi

Examples of javax.persistence.spi.PersistenceUnitTransactionType


       * If explicit type => use it
       * If a JTA DS is used => JTA transaction,
       * if a non JTA DS is used => RESOURCe_LOCAL
       * if none, set to JavaEE default => JTA transaction
       */
      PersistenceUnitTransactionType transactionType = info.getTransactionType();
      if (transactionType == null) {
        if (isJTA == Boolean.TRUE) {
          transactionType = PersistenceUnitTransactionType.JTA;
        }
        else if ( isJTA == Boolean.FALSE ) {
View Full Code Here


           * if explicit => use it
           * if JTA DS => JTA transaction
           * if non JTA DA => RESOURCE_LOCAL transaction
           * else default JavaSE => RESOURCE_LOCAL
           */
          PersistenceUnitTransactionType transactionType = metadata.getTransactionType();
          Boolean isJTA = null;
          if ( StringHelper.isNotEmpty( metadata.getJtaDatasource() ) ) {
            isJTA = Boolean.TRUE;
          }
          else if ( StringHelper.isNotEmpty( metadata.getNonJtaDatasource() ) ) {
View Full Code Here

          }

        }
      }
    }
    PersistenceUnitTransactionType transactionType = getTransactionType( top.getAttribute( "transaction-type" ) );
    if (transactionType != null) metadata.setTransactionType( transactionType );

    return metadata;
  }
View Full Code Here

            }
           
            warnOldProperties(predeployProperties, session);
            session.getPlatform().setConversionManager(new JPAConversionManager());
       
            PersistenceUnitTransactionType transactionType=null;
            //bug 5867753: find and override the transaction type
            String transTypeString = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.TRANSACTION_TYPE, predeployProperties, session);
            if ( transTypeString != null ){
                transactionType=PersistenceUnitTransactionType.valueOf(transTypeString);
            } else if (persistenceUnitInfo!=null){
View Full Code Here

        String eclipselinkPlatform = PropertiesHandler.getPropertyValueLogDebug(PersistenceUnitProperties.TARGET_DATABASE, m, session);
        if (eclipselinkPlatform != null) {
            login.setPlatformClassName(eclipselinkPlatform, persistenceUnitInfo.getClassLoader());
        }
       
        PersistenceUnitTransactionType transactionType = persistenceUnitInfo.getTransactionType();
        //bug 5867753: find and override the transaction type using properties
        String transTypeString = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.TRANSACTION_TYPE, m, session);
        if (transTypeString != null) {
            transactionType = PersistenceUnitTransactionType.valueOf(transTypeString);
        }
View Full Code Here

                warnOldProperties(predeployProperties, session);
                session.getPlatform().setConversionManager(new JPAConversionManager());
               
                if (this.staticWeaveInfo == null) {
                    if (!isComposite) {
                        PersistenceUnitTransactionType transactionType=null;
                        //bug 5867753: find and override the transaction type
                        String transTypeString = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.TRANSACTION_TYPE, predeployProperties, session);
                        if (transTypeString != null && transTypeString.length() > 0) {
                            transactionType=PersistenceUnitTransactionType.valueOf(transTypeString);
                        } else if (persistenceUnitInfo!=null){
View Full Code Here

        }
        if (password != null) {
            login.setPassword(this.securableObjectHolder.getSecurableObject().decryptPassword(password));
        }
       
        PersistenceUnitTransactionType transactionType = this.persistenceUnitInfo.getTransactionType();
        //bug 5867753: find and override the transaction type using properties
        String transTypeString = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.TRANSACTION_TYPE, m, this.session);
        if (transTypeString != null && transTypeString.length() > 0) {
            transactionType = PersistenceUnitTransactionType.valueOf(transTypeString);
        }
View Full Code Here

            updateLoggers(m, serverPlatformChanged, loader);       
            updateProfiler(m,loader);
        }

        if(session.isBroker()) {
            PersistenceUnitTransactionType transactionType = persistenceUnitInfo.getTransactionType();
            //bug 5867753: find and override the transaction type using properties
            String transTypeString = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.TRANSACTION_TYPE, m, session);
            if (transTypeString != null) {
                transactionType = PersistenceUnitTransactionType.valueOf(transTypeString);
            }
View Full Code Here

        // Persistence Unit Transaction Type
        if (transactionTypeEnv != null) {
            try {
                // Override with sys vars
                PersistenceUnitTransactionType type = Enum.valueOf(PersistenceUnitTransactionType.class, transactionTypeEnv.toUpperCase());
                unitInfo.setTransactionType(type);
            } catch (IllegalArgumentException e) {
                throw (IllegalArgumentException)(new IllegalArgumentException("Unknown " + TRANSACTIONTYPE_PROP + ", valid options are " + PersistenceUnitTransactionType.JTA + " or " + PersistenceUnitTransactionType.RESOURCE_LOCAL).initCause(e));
            }
        } else {
            PersistenceUnitTransactionType type = Enum.valueOf(PersistenceUnitTransactionType.class, info.transactionType);
            unitInfo.setTransactionType(type);
        }

        // Non JTA Datasource
        String nonJtaDataSourceId = info.nonJtaDataSource;
View Full Code Here

        // The validation mode to be used for the persistence unit
        final ValidationMode validationMode = Enum.valueOf(ValidationMode.class, info.validationMode);
        unitInfo.setValidationMode(validationMode);

        // Persistence Unit Transaction Type
        final PersistenceUnitTransactionType type = Enum.valueOf(PersistenceUnitTransactionType.class, info.transactionType);
        unitInfo.setTransactionType(type);

        // Non JTA Datasource
        String nonJtaDataSourceId = info.nonJtaDataSource;
        unitInfo.setNonJtaDataSourceName(nonJtaDataSourceId);
View Full Code Here

TOP

Related Classes of javax.persistence.spi.PersistenceUnitTransactionType

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.