HHH-8372 reverted a withTccl change
This commit is contained in:
parent
48a61d9155
commit
78a5316c9d
|
@ -940,12 +940,9 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil
|
|||
final StandardServiceRegistry serviceRegistry = buildServiceRegistry();
|
||||
final ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
|
||||
|
||||
// IMPL NOTE : TCCL handling here is needed because of commons-annotations, Jandex, etc. relying on TCCL being set.
|
||||
return ( (ClassLoaderServiceImpl) classLoaderService ).withTccl(
|
||||
new ClassLoaderServiceImpl.Work<EntityManagerFactoryImpl>() {
|
||||
@Override
|
||||
public EntityManagerFactoryImpl perform() {
|
||||
|
||||
// IMPL NOTE : TCCL handling here is temporary.
|
||||
// It is needed because this code still uses Hibernate Configuration and Hibernate commons-annotations
|
||||
// in turn which relies on TCCL being set.
|
||||
if ( usingNewMetadata ) {
|
||||
final JaccService jaccService = serviceRegistry.getService( JaccService.class );
|
||||
for ( GrantedPermission grantedPermission : grantedJaccPermissions ) {
|
||||
|
@ -1015,6 +1012,10 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil
|
|||
);
|
||||
}
|
||||
else {
|
||||
return ( (ClassLoaderServiceImpl) classLoaderService ).withTccl(
|
||||
new ClassLoaderServiceImpl.Work<EntityManagerFactoryImpl>() {
|
||||
@Override
|
||||
public EntityManagerFactoryImpl perform() {
|
||||
hibernateConfiguration = buildHibernateConfiguration( serviceRegistry );
|
||||
JpaSchemaGenerator.performGeneration( hibernateConfiguration, serviceRegistry );
|
||||
SessionFactoryImplementor sessionFactory;
|
||||
|
@ -1042,9 +1043,9 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil
|
|||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private void processProperties() {
|
||||
applyJdbcConnectionProperties();
|
||||
|
|
Loading…
Reference in New Issue