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

       * 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

            TransactionManagerImpl transactionManager,
            ClassLoader classLoader) {
        List<String> mappingFileNames = mappingFileNamesUntyped == null? new ArrayList<String>(): new ArrayList<String>(mappingFileNamesUntyped);
        List<URL> jarFileUrls = jarFileUrlsUntyped == null? new ArrayList<URL>(): new ArrayList<URL>(jarFileUrlsUntyped);
        List<String> managedClassNames = managedClassNamesUntyped == null? new ArrayList<String>(): new ArrayList<String>(managedClassNamesUntyped);
        PersistenceUnitTransactionType persistenceUnitTransactionType = persistenceUnitTransactionTypeString == null? PersistenceUnitTransactionType.JTA: PersistenceUnitTransactionType.valueOf(persistenceUnitTransactionTypeString);

        persistenceUnitInfo = new PersistenceUnitInfoImpl(persistenceUnitName,
                persistenceProviderClassName,
                persistenceUnitTransactionType,
                jtaDataSourceWrapper == null? null: (DataSource)jtaDataSourceWrapper.$getResource(),
View Full Code Here

        @ManagedOperation
        @Description("change the current transaction type")
        public void setTransactionType(final String type) {
            try {
                final PersistenceUnitTransactionType tt = PersistenceUnitTransactionType.valueOf(type.toUpperCase());
                reloadableEntityManagerFactory.setTransactionType(tt);
            } catch (final Exception iae) {
                // ignored
            }
        }
View Full Code Here

    /**
     * Returns whether provided configuration specifies a JTA or RESOURCE_LOCAL
     * EntityManager.
     */
    private boolean isJta(PersistenceUnitInfo unit, Map<?, ?> overrides) {
        PersistenceUnitTransactionType txType;
        String txTypeOverride = (overrides != null) ? (String) overrides
                .get(TRANSACTION_TYPE_PROPERTY) : null;
        if (txTypeOverride != null) {
            txType = PersistenceUnitTransactionType.valueOf(txTypeOverride);
        }
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

    /**
     * Returns whether provided configuration specifies a JTA or RESOURCE_LOCAL
     * EntityManager.
     */
    private boolean isJta(PersistenceUnitInfo unit, Map overrides) {
        PersistenceUnitTransactionType txType;
        String txTypeOverride = (overrides != null) ? (String) overrides
                .get(TRANSACTION_TYPE_PROPERTY) : null;
        if (txTypeOverride != null) {
            txType = PersistenceUnitTransactionType.valueOf(txTypeOverride);
        }
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.