@Override public void pushClassTransformer(EnhancementContext enhancementContext) { persistenceUnitInfo.addTransformer( new EnhancingClassTransformerImpl( enhancementContext ) ); } }
protected boolean addNamedQueriesToPersistenceUnits(boolean weaverRegistered) throws Exception { //Do this last in case any of the query config classes happens to cause an entity class to be loaded - they will // still be transformed by the previous registered transformers for (PersistenceUnitInfo pui : mergedPus.values()) { //Add annotated named query support from QueryConfiguration beans List<NamedQuery> namedQueries = new ArrayList<>(); List<NamedNativeQuery> nativeQueries = new ArrayList<>(); for (QueryConfiguration config : queryConfigurations) { if (pui.getPersistenceUnitName().equals(config.getPersistenceUnit())) { NamedQueries annotation = config.getClass().getAnnotation(NamedQueries.class); if (annotation != null) { namedQueries.addAll(Arrays.asList(annotation.value())); } NamedNativeQueries annotation2 = config.getClass().getAnnotation(NamedNativeQueries.class); if (annotation2 != null) { nativeQueries.addAll(Arrays.asList(annotation2.value())); } } } if (!namedQueries.isEmpty() || !nativeQueries.isEmpty()) { QueryConfigurationClassTransformer transformer = new QueryConfigurationClassTransformer(namedQueries, nativeQueries, pui.getManagedClassNames()); try { pui.addTransformer(transformer); } catch (Exception e) { weaverRegistered = handleClassTransformerRegistrationProblem(transformer, e); } } } return weaverRegistered; }
for (PersistenceUnitInfo pui : mergedPus.values()) { if (pui.getProperties().containsKey(AvailableSettings.USE_CLASS_ENHANCER) && "true".equalsIgnoreCase(pui.getProperties().getProperty(AvailableSettings.USE_CLASS_ENHANCER))) { pui.addTransformer(new InterceptFieldClassFileTransformer(pui.getManagedClassNames())); ); if (isTransformerQualified) { pui.addTransformer(transformer);
@Override public void addTransformer(ClassTransformer transformer) { delegator.addTransformer( transformer ); }
@Override public void pushClassTransformer(EnhancementContext enhancementContext) { persistenceUnitInfo.addTransformer( new EnhancingClassTransformerImpl( enhancementContext ) ); } }
public Ejb3Configuration configure(String resource) throws HibernateException { Thread thread = null; ClassLoader contextClassLoader = null; if (overridenClassLoader != null) { thread = Thread.currentThread(); contextClassLoader = thread.getContextClassLoader(); thread.setContextClassLoader( overridenClassLoader ); } try { Properties properties = new Properties(); properties.setProperty( HibernatePersistence.CFG_FILE, resource); configure( properties, new HashMap() ); return this; } finally { if (thread != null) thread.setContextClassLoader( contextClassLoader ); } }
info.addTransformer( new InterceptFieldClassFileTransformer( entities ) );
unitInfo.addTransformer(new JPAClassTransformer());
info.addTransformer( new InterceptFieldClassFileTransformer( entities ) );
unitInfo.addTransformer(new JPAClassTransformer());
info.addTransformer(transformer);
info.addTransformer(transformer);
(CLASS_TRANSFORMER_OPTIONS, pui.getProperties()); try { pui.addTransformer(new ClassTransformerImpl(cp, ctOpts, pui.getNewTempClassLoader(), newConfigurationImpl())); } catch (Exception e) {
String ctOpts = (String) Configurations.getProperty(CLASS_TRANSFORMER_OPTIONS, pui.getProperties()); try { pui.addTransformer(new ClassTransformerImpl(cp, ctOpts, pui.getNewTempClassLoader(), newConfigurationImpl())); } catch (Exception e) {
String ctOpts = (String) Configurations.getProperty(CLASS_TRANSFORMER_OPTIONS, pui.getProperties()); try { pui.addTransformer(new ClassTransformerImpl(cp, ctOpts, pui.getNewTempClassLoader(), newConfigurationImpl())); } catch (Exception e) {
String ctOpts = (String) Configurations.getProperty(CLASS_TRANSFORMER_OPTIONS, pui.getProperties()); try { pui.addTransformer(new ClassTransformerImpl(cp, ctOpts, pui.getNewTempClassLoader(), newConfigurationImpl())); } catch (Exception e) {
String ctOpts = (String) Configurations.getProperty(CLASS_TRANSFORMER_OPTIONS, pui.getProperties()); try { pui.addTransformer(new ClassTransformerImpl(cp, ctOpts, pui.getNewTempClassLoader(), newConfigurationImpl())); } catch (Exception e) {