Examples of SharedCacheMode


Examples of javax.persistence.SharedCacheMode

        // Schema version of the persistence.xml file
        unitInfo.setPersistenceXMLSchemaVersion(info.persistenceXMLSchemaVersion);

        // Second-level cache mode for the persistence unit
        SharedCacheMode sharedCacheMode = Enum.valueOf(SharedCacheMode.class, info.sharedCacheMode);
        unitInfo.setSharedCacheMode(sharedCacheMode);

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

Examples of javax.persistence.SharedCacheMode

        // Schema version of the persistence.xml file
        unitInfo.setPersistenceXMLSchemaVersion(info.persistenceXMLSchemaVersion);

        // Second-level cache mode for the persistence unit
        final SharedCacheMode sharedCacheMode = Enum.valueOf(SharedCacheMode.class, info.sharedCacheMode);
        unitInfo.setSharedCacheMode(sharedCacheMode);

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

Examples of javax.persistence.SharedCacheMode

    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
View Full Code Here

Examples of javax.persistence.SharedCacheMode

    }
    return cacheAnn;
  }

  private static SharedCacheMode determineSharedCacheMode(Mappings mappings) {
    SharedCacheMode mode;
    final Object value = mappings.getConfigurationProperties().get( "javax.persistence.sharedCache.mode" );
    if ( value == null ) {
            LOG.debugf("No value specified for 'javax.persistence.sharedCache.mode'; using UNSPECIFIED");
      mode = SharedCacheMode.UNSPECIFIED;
    }
View Full Code Here

Examples of javax.persistence.SharedCacheMode

        @ManagedOperation
        @Description("change the shared cache mode if possible (value is ok)")
        public void setSharedCacheMode(final String value) {
            try {
                final String v = value.trim().toUpperCase();
                final SharedCacheMode mode = v.isEmpty() ? SharedCacheMode.UNSPECIFIED : SharedCacheMode.valueOf(v);
                reloadableEntityManagerFactory.setSharedCacheMode(mode);
            } catch (final Exception iae) {
                // ignored
            }
        }
View Full Code Here

Examples of javax.persistence.SharedCacheMode

    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
View Full Code Here

Examples of javax.persistence.SharedCacheMode

    }
    return cacheAnn;
  }

  private static SharedCacheMode determineSharedCacheMode(Mappings mappings) {
    SharedCacheMode mode;
    final Object value = mappings.getConfigurationProperties().get( "javax.persistence.sharedCache.mode" );
    if ( value == null ) {
      LOG.debug( "No value specified for 'javax.persistence.sharedCache.mode'; using UNSPECIFIED" );
      mode = SharedCacheMode.UNSPECIFIED;
    }
View Full Code Here

Examples of javax.persistence.SharedCacheMode

    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
View Full Code Here

Examples of javax.persistence.SharedCacheMode

    }
    return cacheAnn;
  }

  private static SharedCacheMode determineSharedCacheMode(ExtendedMappings mappings) {
    SharedCacheMode mode;
    final Object value = mappings.getConfigurationProperties().get( "javax.persistence.sharedCache.mode" );
    if ( value == null ) {
      log.debug( "no value specified for 'javax.persistence.sharedCache.mode'; using UNSPECIFIED" );
      mode = SharedCacheMode.UNSPECIFIED;
    }
View Full Code Here

Examples of javax.persistence.SharedCacheMode

        @ManagedOperation
        @Description("change the shared cache mode if possible (value is ok)")
        public void setSharedCacheMode(final String value) {
            try {
                final String v = value.trim().toUpperCase();
                final SharedCacheMode mode = v.isEmpty() ? SharedCacheMode.UNSPECIFIED : SharedCacheMode.valueOf(v);
                reloadableEntityManagerFactory.setSharedCacheMode(mode);
            } catch (final Exception iae) {
                // ignored
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.