private ClassLoaderDelegate generateHcannClassLoaderDelegate() { // class loading here needs to be drastically different for 7.0 // but luckily 7.0 will do away with HCANN use and be easier to // implement this. // // todo (6.0) : *if possible* make similar change in 6.0 // possibly using the JPA temp class loader or create our own "throw awy" ClassLoader; // the trouble there is that we eventually need to load the Class into the real // ClassLoader prior to use final ClassLoaderService classLoaderService = getServiceRegistry().getService( ClassLoaderService.class ); return new ClassLoaderDelegate() { @Override public <T> Class<T> classForName(String className) throws ClassLoadingException { try { return classLoaderService.classForName( className ); } catch (org.hibernate.boot.registry.classloading.spi.ClassLoadingException e) { return StandardClassLoaderDelegateImpl.INSTANCE.classForName( className ); } } }; } }
private ClassLoaderDelegate generateHcannClassLoaderDelegate() { // class loading here needs to be drastically different for 7.0 // but luckily 7.0 will do away with HCANN use and be easier to // implement this. // // todo (6.0) : *if possible* make similar change in 6.0 // possibly using the JPA temp class loader or create our own "throw awy" ClassLoader; // the trouble there is that we eventually need to load the Class into the real // ClassLoader prior to use final ClassLoaderService classLoaderService = getServiceRegistry().getService( ClassLoaderService.class ); return new ClassLoaderDelegate() { @Override public <T> Class<T> classForName(String className) throws ClassLoadingException { try { return classLoaderService.classForName( className ); } catch (org.hibernate.boot.registry.classloading.spi.ClassLoadingException e) { return StandardClassLoaderDelegateImpl.INSTANCE.classForName( className ); } } }; }