|
1 | 1 | /* |
2 | | - * Copyright 2002-2012 the original author or authors. |
| 2 | + * Copyright 2002-2013 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -305,22 +305,23 @@ public PersistenceUnitPostProcessor[] getPersistenceUnitPostProcessors() { |
305 | 305 | /** |
306 | 306 | * Specify the Spring LoadTimeWeaver to use for class instrumentation according |
307 | 307 | * to the JPA class transformer contract. |
308 | | - * <p>It is not required to specify a LoadTimeWeaver: Most providers will be |
309 | | - * able to provide a subset of their functionality without class instrumentation |
310 | | - * as well, or operate with their VM agent specified on JVM startup. |
| 308 | + * <p>It is not required to specify a LoadTimeWeaver: Most providers will be able |
| 309 | + * to provide a subset of their functionality without class instrumentation as well, |
| 310 | + * or operate with their own VM agent specified on JVM startup. Furthermore, |
| 311 | + * DefaultPersistenceUnitManager falls back to an InstrumentationLoadTimeWeaver |
| 312 | + * if Spring's agent-based instrumentation is available at runtime. |
311 | 313 | * <p>In terms of Spring-provided weaving options, the most important ones are |
312 | 314 | * InstrumentationLoadTimeWeaver, which requires a Spring-specific (but very general) |
313 | 315 | * VM agent specified on JVM startup, and ReflectiveLoadTimeWeaver, which interacts |
314 | 316 | * with an underlying ClassLoader based on specific extended methods being available |
315 | 317 | * on it (for example, interacting with Spring's TomcatInstrumentableClassLoader). |
316 | 318 | * <p><b>NOTE:</b> As of Spring 2.5, the context's default LoadTimeWeaver (defined |
317 | 319 | * as bean with name "loadTimeWeaver") will be picked up automatically, if available, |
318 | | - * removing the need for LoadTimeWeaver configuration on each affected target bean.</b> |
| 320 | + * removing the need for LoadTimeWeaver configuration on each affected target bean. |
319 | 321 | * Consider using the {@code context:load-time-weaver} XML tag for creating |
320 | 322 | * such a shared LoadTimeWeaver (autodetecting the environment by default). |
321 | 323 | * @see org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver |
322 | 324 | * @see org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver |
323 | | - * @see org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader |
324 | 325 | */ |
325 | 326 | public void setLoadTimeWeaver(LoadTimeWeaver loadTimeWeaver) { |
326 | 327 | this.loadTimeWeaver = loadTimeWeaver; |
@@ -447,7 +448,7 @@ private SpringPersistenceUnitInfo buildDefaultPersistenceUnitInfo() { |
447 | 448 | } |
448 | 449 | } |
449 | 450 | catch (IOException ex) { |
450 | | - throw new PersistenceException("Failed to scan classpath for unlisted classes", ex); |
| 451 | + throw new PersistenceException("Failed to scan classpath for unlisted entity classes", ex); |
451 | 452 | } |
452 | 453 | } |
453 | 454 | } |
|
0 commit comments