From b7f143ae581289b541d81be1661b015de2a0b408 Mon Sep 17 00:00:00 2001 From: Thomas Risberg Date: Thu, 21 Jan 2010 16:49:05 +0000 Subject: [PATCH] updated reference documentation with references to "spring-agent.jar" to use "org.springframework.instrument-{version}.jar" (SPR-6597) --- spring-framework-reference/src/aop.xml | 4 ++-- spring-framework-reference/src/orm.xml | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/spring-framework-reference/src/aop.xml b/spring-framework-reference/src/aop.xml index 4e246be7686..15d34eee759 100644 --- a/spring-framework-reference/src/aop.xml +++ b/spring-framework-reference/src/aop.xml @@ -3115,8 +3115,8 @@ public class Account { without making any modifications to the application server's launch script that will be needed to add -javaagent:path/to/aspectjweaver.jar or (as we describe later in this - section) -javaagent:path/to/spring-instrument.jar (previously named - spring-agent.jar). Developers simply modify + section) -javaagent:path/to/org.springframework.instrument-{version}.jar + (previously named spring-agent.jar). Developers simply modify one or more files that form the application context to enable load-time weaving instead of relying on administrators who typically are in charge of the deployment configuration such as the launch script. diff --git a/spring-framework-reference/src/orm.xml b/spring-framework-reference/src/orm.xml index b7e3523602b..766a9ffa148 100644 --- a/spring-framework-reference/src/orm.xml +++ b/spring-framework-reference/src/orm.xml @@ -1631,7 +1631,8 @@ TR: REVISED, PLS REVIEW. Should be *inside your war*.--> a JDK agent can be the only solution. For such cases, Spring provides InstrumentationLoadTimeWeaver, which requires a Spring-specific (but very general) VM agent, spring-agent.jar: + class="libraryfile">org.springframework.instrument-{version}.jar (previously named spring-agent.jar): <bean id="emf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="loadTimeWeaver"> @@ -1642,15 +1643,16 @@ TR: REVISED, PLS REVIEW. Should be *inside your war*.--> You must start the virtual machine with the Spring agent, by supplying the following JVM options: - -javaagent:/path/to/spring-agent.jar + -javaagent:/path/to/org.springframework.instrument-{version}.jar
Context-wide load-time weaver setup - In Spring 2.5 and later, you can configure a context-wide + You can configure a context-wide LoadTimeWeaver using the - context:load-time-weaver configuration element. + context:load-time-weaver configuration element. (This + has been available since Spring 2.5.) Such a global weaver is picked up by all JPA LocalContainerEntityManagerFactoryBeans automatically.