Package org.hibernate.search.engine.service.classloading.spi

Examples of org.hibernate.search.engine.service.classloading.spi.ClassLoaderService


   * @param serviceManager the ServiceManager to load resources
   * @throws IOException
   * @return
   */
  public ConfigurationBuilderHolder parseFile(String filename, String transportOverrideResource, ServiceManager serviceManager) throws IOException {
    ClassLoaderService classLoaderService = serviceManager.requestService( ClassLoaderService.class );
    try {
      return parseFile( classLoaderService, filename, transportOverrideResource );
    }
    finally {
      serviceManager.releaseService( ClassLoaderService.class );
View Full Code Here


   * @param serviceManager the ServiceManager to load resources
   * @throws IOException
   * @return
   */
  public ConfigurationBuilderHolder parseFile(String filename, String transportOverrideResource, ServiceManager serviceManager) throws IOException {
    ClassLoaderService classLoaderService = serviceManager.requestService( ClassLoaderService.class );
    try {
      return parseFile( classLoaderService, filename, transportOverrideResource );
    }
    finally {
      serviceManager.releaseService( ClassLoaderService.class );
View Full Code Here

      sf.close();
    }
  }

  private static Class<?> getClassByNumber(int i, ServiceManager serviceManager) throws ClassNotFoundException {
    ClassLoaderService classLoaderService = serviceManager.requestService( ClassLoaderService.class );
    Class<?> clazz;
    try {
      clazz = classLoaderService.classForName(
          Generated.A0.class.getName().replace( "A0", "A" + i )
      );
    }
    finally {
      serviceManager.releaseService( ClassLoaderService.class );
View Full Code Here

    if ( criteria instanceof CriteriaImpl ) {
      String targetEntity = ( (CriteriaImpl) criteria ).getEntityOrClassName();
      if ( entityType == null ) {
        ServiceManager serviceManager = searchFactoryImplementor.getServiceManager();
        try {
          ClassLoaderService classLoaderService = serviceManager.requestService( ClassLoaderService.class );
          entityType = classLoaderService.classForName( targetEntity );
        }
        catch (ClassLoadingException e) {
          throw new SearchException( "Unable to load entity class from criteria: " + targetEntity, e );
        }
        finally {
View Full Code Here

    }
  }

  public static Class<?> classForName(String classNameToLoad, String componentDescription, ServiceManager serviceManager) {
    Class<?> clazz;
    ClassLoaderService classLoaderService = serviceManager.requestService( ClassLoaderService.class );
    try {
      clazz = classLoaderService.classForName( classNameToLoad );
    }
    catch (ClassLoadingException e) {
      throw new SearchException(
          "Unable to find " + componentDescription +
              " implementation class: " + classNameToLoad, e
View Full Code Here

   * @return The class reference.
   *
   * @throws ClassLoadingException From {@link Class#forName(String, boolean, ClassLoader)}.
   */
  public static Class classForName(String classNameToLoad, ServiceManager serviceManager) {
    ClassLoaderService classLoaderService = serviceManager.requestService( ClassLoaderService.class );
    try {
      return classLoaderService.classForName( classNameToLoad );
    }

    finally {
      serviceManager.releaseService( ClassLoaderService.class );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.search.engine.service.classloading.spi.ClassLoaderService

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.