Package org.hibernate.boot.registry.classloading.spi

Examples of org.hibernate.boot.registry.classloading.spi.ClassLoaderService.classForName()


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


      return null;
    }

    if ( serviceRegistry != null ) {
      final ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
      final Class<Driver> driverClass = classLoaderService.classForName( driverClassName );
      try {
        return driverClass.newInstance();
      }
      catch ( Exception e ) {
        throw new ServiceException( "Specified JDBC Driver " + driverClassName + " could not be loaded", 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 {
          resolver.addResolver(
              (DatabaseInfoDialectResolver) classLoaderService.classForName( resolverImplName ).newInstance()
          );
        }
        catch (HibernateException e) {
          throw e;
        }
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

    if ( StringHelper.isNotEmpty( resolverImplNames ) ) {
      final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
      for ( String resolverImplName : StringHelper.split( ", \n\r\f\t", resolverImplNames ) ) {
        try {
          resolver.addResolver(
              (DialectResolver) classLoaderService.classForName( resolverImplName ).newInstance()
          );
        }
        catch (HibernateException e) {
          throw 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 {
          resolver.addResolver(
              (DatabaseInfoDialectResolver) classLoaderService.classForName( resolverImplName ).newInstance()
          );
        }
        catch (HibernateException e) {
          throw 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

    }
    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

    // being found as the indicator


    // JBoss ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    try {
      classLoaderService.classForName( JBossStandAloneJtaPlatform.JBOSS_TM_CLASS_NAME );
      classLoaderService.classForName( JBossStandAloneJtaPlatform.JBOSS_UT_CLASS_NAME );

      // we know that the JBoss TS classes are available
      // if neither of these look-ups resulted in an error (no such class), then JBossTM is available on
      // the classpath
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.