Package org.hibernate.service.classloading.spi

Examples of org.hibernate.service.classloading.spi.ClassLoaderService.classForName()


      }
      else {
        final String className = configValue.toString();
        final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
        try {
          implClass = classLoaderService.classForName( className );
        }
        catch (ClassLoadingException cle) {
          log.warn( "Unable to locate specified class [" + className + "]", cle );
          return null;
        }
View Full Code Here


    }
    else {
      final String platformImplName = platform.toString();
      final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
      try {
        jtaPlatformImplClass = classLoaderService.classForName( platformImplName );
      }
      catch ( Exception e ) {
        throw new HibernateException( "Unable to locate specified JtaPlatform class [" + platformImplName + "]", e );
      }
    }
View Full Code Here

    final ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
        Dialect dialect = serviceRegistry.getService( JdbcServices.class ).getDialect();
    // try to locate a BV class to see if it is available on the classpath
    boolean isBeanValidationAvailable;
    try {
      classLoaderService.classForName( BV_CHECK_CLASS );
      isBeanValidationAvailable = true;
    }
    catch ( Exception e ) {
      isBeanValidationAvailable = false;
    }
View Full Code Here

    }
    else {
      // assume it names the factory class
      final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
      try {
        statisticsFactory = (StatisticsFactory) classLoaderService.classForName( configValue.toString() ).newInstance();
      }
      catch (HibernateException e) {
        throw e;
      }
      catch (Exception e) {
View Full Code Here

  private ConfiguredClassHierarchy(List<ClassInfo> classes, ServiceRegistry serviceRegistry) {
    defaultAccessType = determineDefaultAccessType( classes );
    inheritanceType = determineInheritanceType( classes );

    ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
    Class<?> clazz = classLoaderService.classForName( classes.get( classes.size() - 1 ).name().toString() );
    ResolvedTypeWithMembers resolvedMembers = ReflectionHelper.resolveMemberTypes( clazz );

    configuredClasses = new ArrayList<ConfiguredClass>();
    ConfiguredClass parent = null;
    for ( ClassInfo info : classes ) {
View Full Code Here

      return EntityCopyAllowedLoggedObserver.class;
    }
    else {
      final ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
      try {
        return classLoaderService.classForName( entityCopyObserverStrategyString );
      }
      catch (ClassLoadingException e) {
        throw new HibernateException(
            "Unable resolve strategy [" +
                entityCopyObserverStrategyString +
View Full Code Here

    }
    else {
      final String platformImplName = platform.toString();
      final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
      try {
        jtaPlatformImplClass = classLoaderService.classForName( platformImplName );
      }
      catch ( Exception e ) {
        throw new HibernateException( "Unable to locate specified JtaPlatform class [" + platformImplName + "]", e );
      }
    }
View Full Code Here

    final String strategyClassName = mapLegacyNames( strategy.toString() );
        LOG.transactionStrategy(strategyClassName);

    ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
    try {
      return (TransactionFactory) classLoaderService.classForName( strategyClassName ).newInstance();
    }
    catch ( Exception e ) {
      throw new HibernateException( "Unable to instantiate specified TransactionFactory class [" + strategyClassName + "]", e );
    }
  }
View Full Code Here

    }
    else {
      final String platformImplName = platform.toString();
      final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
      try {
        jtaPlatformImplClass = classLoaderService.classForName( platformImplName );
      }
      catch ( Exception e ) {
        throw new HibernateException( "Unable to locate specified JtaPlatform class [" + platformImplName + "]", e );
      }
    }
View Full Code Here

    }
    else {
      // assume it names the factory class
      final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
      try {
        statisticsFactory = (StatisticsFactory) classLoaderService.classForName( configValue.toString() ).newInstance();
      }
      catch (HibernateException e) {
        throw e;
      }
      catch (Exception e) {
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.