Examples of FullTextIndexEventListener


Examples of org.hibernate.search.event.impl.FullTextIndexEventListener

    if ( !registerListeners ) {
      log.debug( "Skipping Hibernate Search event listener auto registration" );
      return;
    }

    listener = new FullTextIndexEventListener( FullTextIndexEventListener.Installation.SINGLE_INSTANCE );

    EventListenerRegistry listenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    //TODO if the event is duplicated, do not initialize the newly created listener
    listenerRegistry.addDuplicationStrategy( new DuplicationStrategyImpl( FullTextIndexEventListener.class ) );
View Full Code Here

Examples of org.hibernate.search.event.impl.FullTextIndexEventListener

    final EventListenerRegistry service = sfi
        .getServiceRegistry()
        .getService( EventListenerRegistry.class );
    final Iterable<PostInsertEventListener> listeners = service.getEventListenerGroup( EventType.POST_INSERT )
        .listeners();
    FullTextIndexEventListener listener = null;
    //FIXME this sucks since we mandate the event listener use
    for ( PostInsertEventListener candidate : listeners ) {
      if ( candidate instanceof FullTextIndexEventListener ) {
        listener = (FullTextIndexEventListener) candidate;
        break;
      }
    }
    if ( listener == null ) {
      throw new HibernateException(
          "Hibernate Search Event listeners not configured, please check the reference documentation and the " +
              "application's hibernate.cfg.xml"
      );
    }
    return listener.getSearchFactoryImplementor();
  }
View Full Code Here

Examples of org.hibernate.search.event.impl.FullTextIndexEventListener

    if ( !registerListeners ) {
      log.debug( "Skipping Hibernate Search event listener auto registration" );
      return;
    }

    listener = new FullTextIndexEventListener( FullTextIndexEventListener.Installation.SINGLE_INSTANCE );

    EventListenerRegistry listenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
    //TODO if the event is duplicated, do not initialize the newly created listener
    listenerRegistry.addDuplicationStrategy( new DuplicationStrategyImpl( FullTextIndexEventListener.class ) );
View Full Code Here

Examples of org.hibernate.search.event.impl.FullTextIndexEventListener

    final EventListenerRegistry service = sfi
        .getServiceRegistry()
        .getService( EventListenerRegistry.class );
    final Iterable<PostInsertEventListener> listeners = service.getEventListenerGroup( EventType.POST_INSERT )
        .listeners();
    FullTextIndexEventListener listener = null;
    //FIXME this sucks since we mandate the event listener use
    for ( PostInsertEventListener candidate : listeners ) {
      if ( candidate instanceof FullTextIndexEventListener ) {
        listener = (FullTextIndexEventListener) candidate;
        break;
      }
    }
    if ( listener == null ) {
      throw new HibernateException(
          "Hibernate Search Event listeners not configured, please check the reference documentation and the " +
              "application's hibernate.cfg.xml"
      );
    }
    return listener.getSearchFactoryImplementor();
  }
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.