示例#1
0
  @Override
  protected void configureMetadataBuilder(MetadataBuilder metadataBuilder) {
    super.configureMetadataBuilder(metadataBuilder);

    metadataBuilder.applySharedCacheMode(SharedCacheMode.ENABLE_SELECTIVE);
    metadataBuilder.applyAccessType(AccessType.READ_WRITE);
  }
 @Override
 protected void addSettings(Map settings) {
   super.addSettings(settings);
   settings.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, true);
 }
示例#3
0
 @Override
 protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) {
   super.configureStandardServiceRegistryBuilder(ssrb);
   ssrb.applySetting(AvailableSettings.USE_SECOND_LEVEL_CACHE, true);
 }
 @Override
 public void releaseResources() {
   super.releaseResources();
   connectionProvider.stop();
 }