org.apache.cayenne.jpa.instrument
Class InstrumentingUnit
java.lang.Object
org.apache.cayenne.jpa.JpaUnit
org.apache.cayenne.jpa.instrument.InstrumentingUnit
public class InstrumentingUnit
- extends JpaUnit
A unit that loads all transformers into a shared Instrumentation instance.
- Author:
- Andrus Adamchik
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Method Summary |
void |
addTransformer(ClassTransformer transformer)
Adds a ClassTransformer to the persistence unit. |
protected org.apache.commons.logging.Log |
getLogger()
|
Methods inherited from class org.apache.cayenne.jpa.JpaUnit |
addJarFileUrl, addManagedClassName, addMappingFileName, addProperties, excludeUnlistedClasses, getClassLoader, getDescription, getJarFileUrls, getJtaDataSource, getManagedClassNames, getMappingFileNames, getNewTempClassLoader, getNonJtaDataSource, getPersistenceProviderClassName, getPersistenceUnitName, getPersistenceUnitRootUrl, getProperties, getTransactionType, putProperty, setClassLoader, setDefaultClassLoader, setDescription, setExcludeUnlistedClasses, setPersistenceUnitName, setPersistenceUnitRootUrl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.apache.commons.logging.Log logger
InstrumentingUnit
public InstrumentingUnit()
addTransformer
public void addTransformer(ClassTransformer transformer)
- Description copied from class:
JpaUnit
- Adds a
ClassTransformer
to the persistence unit.
JPA Specification, 7.1.4:
Add a transformer supplied by the provider that will be called for every new class
definition or class redefinition that gets loaded by the loader returned by the
PersistenceInfo.getClassLoader method. The transformer has no effect on the result
returned by the PersistenceInfo.getTempClassLoader method. Classes are only
transformed once within the same classloading scope, regardless of how many
persistence units they may be a part of.
- Specified by:
addTransformer
in class JpaUnit
- Parameters:
transformer
- A provider-supplied transformer that the Container invokes at
class-(re)definition time
getLogger
protected org.apache.commons.logging.Log getLogger()
Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.