Best code examples for Hibernate ORM SessionFactoryServiceRegistry class (org.hibernate.service.spi.SessionFactoryServiceRegistry)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM SessionFactoryServiceRegistry class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM SessionFactoryServiceRegistry examples from Open Source projects
This code example shows how to use the following methods: getService
    public void integrate(Configuration configuration,
            SessionFactoryImplementor sessionFactory,
            SessionFactoryServiceRegistry serviceRegistry) {
        if (Contexts.isApplicationContextActive()) { 
            final EventListenerRegistry eventListenerRegistry =
                    serviceRegistry.getService(EventListenerRegistry.class);
            TranslationUpdateListener updateListener =
                    ServiceLocator.instance().getInstance( 
                            TranslationUpdateListener.class); 
            log.info("register event listener: {}", updateListener);
            // We have to use POST_UPDATE not POST_UPDATE_COMMIT. Because we 
            // still need to access some other entities to make transunit. After 
            // commit the transaction is closed. 
            eventListenerRegistry.appendListeners(EventType.POST_UPDATE,
                    updateListener);
            eventListenerRegistry.appendListeners(EventType.POST_INSERT,
                    updateListener);
        } 
    } 
 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getService