Package org.hibernate

Examples of org.hibernate.SessionFactoryObserver


    ConfigurationHelper.resolvePlaceHolders( properties );
    final ServiceRegistry serviceRegistry =  new ServiceRegistryBuilder()
        .applySettings( properties )
        .buildServiceRegistry();
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
          public void sessionFactoryCreated(SessionFactory factory) {
          }

          @Override
View Full Code Here


    ConfigurationHelper.resolvePlaceHolders( properties );
    final ServiceRegistry serviceRegistry =  new ServiceRegistryBuilder()
        .applySettings( properties )
        .buildServiceRegistry();
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
          public void sessionFactoryCreated(SessionFactory factory) {
          }

          @Override
View Full Code Here

    ConfigurationHelper.resolvePlaceHolders( properties );
    final ServiceRegistry serviceRegistry =  new ServiceRegistryBuilder()
        .applySettings( properties )
        .buildServiceRegistry();
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
          public void sessionFactoryCreated(SessionFactory factory) {
          }

          @Override
View Full Code Here

  public static final String ENTITY_CACHE = "ENTITIES";
  public static final String ASSOCIATION_CACHE = "ASSOCIATIONS";
  public static final String IDENTIFIER_CACHE = "IDENTIFIERS";

  public static GridMetadataManager getGridMetadataManager(SessionFactoryImplementor factory) {
    final SessionFactoryObserver sessionFactoryObserver = factory.getFactoryObserver();
    if ( sessionFactoryObserver instanceof GridMetadataManager ) {
      return ( GridMetadataManager ) sessionFactoryObserver;
    }
    else {
      StringBuilder error = new StringBuilder("Cannot get CacheManager for OGM. ");
View Full Code Here

    );
    serviceRegistryBuilder.applySettings( cfg.getProperties() );
    configure( (Properties ) null, null );
    NamingHelper.bind( this );
    final ServiceRegistry serviceRegistry = serviceRegistryBuilder.buildServiceRegistry();
    SessionFactoryObserver serviceRegistryCloser = new SessionFactoryObserver() {
      @Override
      public void sessionFactoryCreated(SessionFactory factory) {
      }

      @Override
View Full Code Here

    );
    if ( namingStrategy != null ) {
      cfg.setNamingStrategy( namingStrategy );
    }

    final SessionFactoryObserver observer = instantiateCustomClassFromConfiguration(
        preparedProperties,
        null,
        cfg.getSessionFactoryObserver(),
        AvailableSettings.SESSION_FACTORY_OBSERVER,
        "SessionFactory observer",
View Full Code Here

    );
    serviceRegistryBuilder.applySettings( cfg.getProperties() );
    configure( (Properties ) null, null );
    NamingHelper.bind( this );
    final ServiceRegistry serviceRegistry = serviceRegistryBuilder.buildServiceRegistry();
    SessionFactoryObserver serviceRegistryCloser = new SessionFactoryObserver() {
      @Override
      public void sessionFactoryCreated(SessionFactory factory) {
      }

      @Override
View Full Code Here

    );
    if ( namingStrategy != null ) {
      cfg.setNamingStrategy( namingStrategy );
    }

    final SessionFactoryObserver observer = instantiateCustomClassFromConfiguration(
        preparedProperties,
        null,
        cfg.getSessionFactoryObserver(),
        AvailableSettings.SESSION_FACTORY_OBSERVER,
        "SessionFactory observer",
View Full Code Here

    this.properties.putAll( cfg.getProperties() );
    this.interceptor = cfg.getInterceptor();
    this.settings = settings;
    this.sqlFunctionRegistry = new SQLFunctionRegistry(settings.getDialect(), cfg.getSqlFunctions());
        this.eventListeners = listeners;
    this.observer = observer != null ? observer : new SessionFactoryObserver() {
      public void sessionFactoryCreated(SessionFactory factory) {
      }
      public void sessionFactoryClosed(SessionFactory factory) {
      }
    };
View Full Code Here

    ConfigurationHelper.resolvePlaceHolders( properties );
    final ServiceRegistry serviceRegistry =  new ServiceRegistryBuilder()
        .applySettings( properties )
        .buildServiceRegistry();
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
          public void sessionFactoryCreated(SessionFactory factory) {
          }

          @Override
View Full Code Here

TOP

Related Classes of org.hibernate.SessionFactoryObserver

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.