cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r454771 - in /incubator/cayenne/main/trunk/core/cayenne-jpa: pom.xml src/main/java/org/apache/cayenne/jpa/instrument/InstrumentingUnit.java
Date Tue, 10 Oct 2006 15:03:42 GMT
Author: aadamchik
Date: Tue Oct 10 08:03:41 2006
New Revision: 454771

URL: http://svn.apache.org/viewvc?view=rev&rev=454771
Log:
CAY-684 - removing direct dependency on CayenneAgent; using reflection-based InstrumentUtil

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jpa/pom.xml
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/instrument/InstrumentingUnit.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/pom.xml?view=diff&rev=454771&r1=454770&r2=454771
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/pom.xml (original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/pom.xml Tue Oct 10 08:03:41 2006
@@ -53,13 +53,6 @@
 			<artifactId>cayenne-jdk1.5</artifactId>
 			<version>${version}</version>
 		</dependency>
-		
-		<dependency>
-			<groupId>org.apache.cayenne.core</groupId>
-			<artifactId>cayenne-agent</artifactId>
-			<version>${version}</version>
-			<scope>provided</scope>
-		</dependency>
 
 		<dependency>
 			<groupId>cglib</groupId>

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/instrument/InstrumentingUnit.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/instrument/InstrumentingUnit.java?view=diff&rev=454771&r1=454770&r2=454771
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/instrument/InstrumentingUnit.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/instrument/InstrumentingUnit.java
Tue Oct 10 08:03:41 2006
@@ -25,7 +25,7 @@
 
 import javax.persistence.spi.ClassTransformer;
 
-import org.apache.cayenne.instrument.CayenneAgent;
+import org.apache.cayenne.instrument.InstrumentUtil;
 import org.apache.cayenne.jpa.spi.JpaUnit;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -44,7 +44,7 @@
     public void addTransformer(final ClassTransformer transformer) {
 
         // sanity check
-        if (CayenneAgent.getInstrumentation() == null) {
+        if (!InstrumentUtil.isAgentLoaded()) {
             getLogger().warn(
                     "*** No instrumentation instance present. "
                             + "Check the -javaagent: option");
@@ -71,7 +71,7 @@
         };
 
         getLogger().info("*** Adding transformer: " + transformer);
-        CayenneAgent.getInstrumentation().addTransformer(transformerWrapper);
+        InstrumentUtil.addTransformer(transformerWrapper);
     }
 
     protected Log getLogger() {



Mime
View raw message