Package org.hibernate.service.classloading.spi

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


            if (name == null) {
                //we can have non java class persisted by hibernate
                continue;
            }
            try {
                callbackHandler.add(classLoaderSvc.classForName(name), classLoaderSvc, binding);
            } catch (ClassLoadingException error) {
                throw new MappingException( "entity class not found: " + name, error );
            }
        }
//
View Full Code Here


            if (name == null) {
                //we can have non java class persisted by hibernate
                continue;
            }
            try {
                callbackHandler.add(classLoaderSvc.classForName(name), classLoaderSvc, binding);
            } catch (ClassLoadingException error) {
                throw new MappingException( "entity class not found: " + name, error );
            }
        }
//
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

    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

    if ( StringHelper.isNotEmpty( resolverImplNames ) ) {
      final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
      for ( String resolverImplName : StringHelper.split( ", \n\r\f\t", resolverImplNames ) ) {
        try {
          resolvers.add( (DialectResolver) classLoaderService.classForName( resolverImplName ).newInstance() );
        }
        catch (HibernateException e) {
          throw e;
        }
        catch (Exception e) {
View Full Code Here

  // todo : remove this once the state objects are cleaned up

  public static Class classForName(String className, ServiceRegistry serviceRegistry) {
    ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
    try {
      return classLoaderService.classForName( className );
    }
    catch ( ClassLoadingException e ) {
      throw new MappingException( "Could not find class: " + className );
    }
  }
View Full Code Here

      }
      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 );
          throw new ServiceException( "Unable to locate specified multi-tenant connection provider [" + className + "]" );
        }
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

    final ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );

    // 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

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.