Package org.hibernate.search.engine.service.impl

Examples of org.hibernate.search.engine.service.impl.StandardServiceManager


      factoryState.setDocumentBuildersContainedEntities( new ConcurrentHashMap<Class<?>, DocumentBuilderContainedEntity>() );
      factoryState.setFilterDefinitions( new ConcurrentHashMap<String, FilterDef>() );
      factoryState.setIndexHierarchy( new PolymorphicIndexHierarchy() );
      factoryState.setConfigurationProperties( cfg.getProperties() );
      factoryState.setServiceManager(
          new StandardServiceManager(
              cfg,
              buildContext,
              Environment.DEFAULT_SERVICES_MAP
          )
      );
View Full Code Here


    return INDEXING_STRATEGY_EVENT;
  }

  @Override
  public ServiceManager getServiceManager() {
    return new StandardServiceManager( searchConfiguration, this, Environment.DEFAULT_SERVICES_MAP );
  }
View Full Code Here

  private ServiceManager serviceManagerUnderTest;

  @Before
  public void setUp() {
    searchConfiguration = new SearchConfigurationForTest();
    serviceManagerUnderTest = new StandardServiceManager(
        searchConfiguration,
        new DummyBuildContext()
    );
  }
View Full Code Here

  @Test
  public void providedServicesHavePrecedence() {
    SearchConfigurationForTest configuration = new SearchConfigurationForTest();
    configuration.getProvidedServices().put( SimpleService.class, new ProgrammaticallyConfiguredSimpleService() );

    serviceManagerUnderTest = new StandardServiceManager(
        configuration,
        new DummyBuildContext()
    );

    SimpleService simpleService = serviceManagerUnderTest.requestService( SimpleService.class );
View Full Code Here

    thrown.expectMessage( JUnitMatchers.containsString( "HSEARCH000210" ) );
    searchConfiguration.addProvidedService(
        StartableProvidedService.class,
        new StartableProvidedServiceImpl()
    );
    serviceManagerUnderTest = new StandardServiceManager(
        searchConfiguration,
        new DummyBuildContext()
    );
  }
View Full Code Here

    thrown.expectMessage( JUnitMatchers.containsString( "HSEARCH000210" ) );
    searchConfiguration.addProvidedService(
        StoppableProvidedService.class,
        new StoppableProvidedServiceImpl()
    );
    serviceManagerUnderTest = new StandardServiceManager(
        searchConfiguration,
        new DummyBuildContext()
    );
  }
View Full Code Here

* @author Hardy Ferentschik
*/
public class NativeJavaSerializationProviderTest {
  @Test
  public void testCorrectSerializationProviderDetected() {
    ServiceManager serviceManager = new StandardServiceManager(
        new SearchConfigurationForTest(),
        null
    );

    SerializationProvider serializationProvider = serviceManager.requestService( SerializationProvider.class );
    assertTrue( "Wrong serialization provider", serializationProvider instanceof NativeJavaSerializationProvider );
  }
View Full Code Here

  private SerializationProvider serializationProvider;

  @Before
  public void setUp() {
    ServiceManager serviceManager = new StandardServiceManager(
        new SearchConfigurationForTest(),
        null
    );

    serializationProvider = serviceManager.requestService( SerializationProvider.class );
    assertTrue( "Wrong serialization provider", serializationProvider instanceof AvroSerializationProvider );
  }
View Full Code Here

  @Before
  public void setUp() {
    SearchConfiguration searchConfiguration = new SearchConfigurationForTest();
    BuildContext buildContext = new BuildContextForTest( searchConfiguration );
    ServiceManager serviceManager = new StandardServiceManager( searchConfiguration, buildContext );
    resourceLoader = new HibernateSearchResourceLoader( serviceManager );
  }
View Full Code Here

  public SearchFactoryHolder searchFactoryHolder = new SearchFactoryHolder( RemoteEntity.class );
  private SerializationProvider serializationProvider;

  @Before
  public void setUp() {
    ServiceManager serviceManager = new StandardServiceManager(
        new SearchConfigurationForTest(),
        null
    );
    serializationProvider = serviceManager.requestService( SerializationProvider.class );
    assertTrue( "Wrong serialization provider", serializationProvider instanceof AvroSerializationProvider );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.engine.service.impl.StandardServiceManager

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.