Package org.hibernate.internal

Examples of org.hibernate.internal.SessionFactoryImpl


      Esi4JBatchedEventProcessor batchedEventProcessor) {
    if (_listener != null) {
      throw new IllegalStateException("already injected");
    }

    SessionFactoryImpl sessionFactoryImpl = (SessionFactoryImpl) sessionFactory;

    EventListenerRegistry registry = sessionFactoryImpl.getServiceRegistry()
        .getService(EventListenerRegistry.class);

    _listener = doCreateListener(sessionFactoryImpl, batchedEventProcessor);

    if (_listener instanceof PostInsertEventListener) {
View Full Code Here


  public synchronized void removeLifecycle(SessionFactory sessionFactory) {
    if (_listener == null) {
      return;
    }

    SessionFactoryImpl sessionFactoryImpl = (SessionFactoryImpl) sessionFactory;

    EventListenerRegistry registry = sessionFactoryImpl.getServiceRegistry()
        .getService(EventListenerRegistry.class);

    if (registerPostCommitListeneres) {
      removeListeners(registry, _listener, POST_COMMIT_INSERT, POST_COMMIT_UPDATE, POST_COMMIT_DELETE);
    } else {
View Full Code Here

    Properties copy = new Properties();
    copy.putAll( properties );
    ConfigurationHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy, serviceRegistry );

    return new SessionFactoryImpl(
        this,
        mapping,
        serviceRegistry,
        settings,
        sessionFactoryObserver
View Full Code Here

    Properties copy = new Properties();
    copy.putAll( properties );
    ConfigurationHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy, serviceRegistry );

    return new SessionFactoryImpl(
        this,
        mapping,
        serviceRegistry,
        settings,
        sessionFactoryObserver
View Full Code Here

    Properties copy = new Properties();
    copy.putAll( properties );
    ConfigurationHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy, serviceRegistry );

    return new SessionFactoryImpl(
        this,
        mapping,
        serviceRegistry,
        settings,
        sessionFactoryObserver
View Full Code Here

    Properties copy = new Properties();
    copy.putAll( properties );
    ConfigurationHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy, serviceRegistry );

    return new SessionFactoryImpl(
        this,
        mapping,
        serviceRegistry,
        settings,
        sessionFactoryObserver
View Full Code Here

    Properties copy = new Properties();
    copy.putAll( properties );
    ConfigurationHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy, serviceRegistry );

    return new SessionFactoryImpl(
        this,
        mapping,
        serviceRegistry,
        settings,
        sessionFactoryObserver
View Full Code Here

    Properties copy = new Properties();
    copy.putAll( properties );
    ConfigurationHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy, serviceRegistry );

    return new SessionFactoryImpl(
        this,
        mapping,
        serviceRegistry,
        settings,
        sessionFactoryObserver
View Full Code Here

    Properties copy = new Properties();
    copy.putAll( properties );
    ConfigurationHelper.resolvePlaceHolders( copy );
    Settings settings = buildSettings( copy, serviceRegistry );

    return new SessionFactoryImpl(
        this,
        mapping,
        serviceRegistry,
        settings,
        sessionFactoryObserver
View Full Code Here

        interested = new ConcurrentHashMap<Class<?>, BlockingQueue<NotBlockingAutoUpdatedSnapshot<?>>>();
    }

    @PostConstruct
    private void registerHibernateListeners() {
        SessionFactoryImpl impl = (SessionFactoryImpl) sessionFactory;
        EventListenerRegistry registry = impl.getServiceRegistry().getService(EventListenerRegistry.class);

        registry.appendListeners(EventType.POST_INSERT, this);
        registry.appendListeners(EventType.POST_UPDATE, this);
        registry.appendListeners(EventType.POST_DELETE, this);
View Full Code Here

TOP

Related Classes of org.hibernate.internal.SessionFactoryImpl

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.