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

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


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


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

    catch (ClassLoadingException ignore) {
    }

    // Bitronix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    try {
      classLoaderService.classForName( BitronixJtaPlatform.TM_CLASS_NAME );
      return new BitronixJtaPlatform();
    }
    catch (ClassLoadingException ignore) {
    }
View Full Code Here

    catch (ClassLoadingException ignore) {
    }

    // JOnAS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    try {
      classLoaderService.classForName( JOnASJtaPlatform.TM_CLASS_NAME );
      return new JOnASJtaPlatform();
    }
    catch (ClassLoadingException ignore) {
    }
View Full Code Here

    catch (ClassLoadingException ignore) {
    }

    // JOTM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    try {
      classLoaderService.classForName( JOTMJtaPlatform.TM_CLASS_NAME );
      return new JOTMJtaPlatform();
    }
    catch (ClassLoadingException ignore) {
    }
View Full Code Here

    // WebSphere ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    for ( WebSphereJtaPlatform.WebSphereEnvironment webSphereEnvironment
        : WebSphereJtaPlatform.WebSphereEnvironment.values() ) {
      try {
        Class accessClass = classLoaderService.classForName( webSphereEnvironment.getTmAccessClassName() );
        return new WebSphereJtaPlatform( accessClass, webSphereEnvironment );
      }
      catch (ClassLoadingException ignore) {
      }
    }
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

      }
      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

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.