-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Matt Young opened SPR-8523 and commented
I've boiled down a confusing situation into a reproducible odd behavior in the attached example application. In an OpenJPA-supported application when there are two classes (an abstract parent and a concrete child) that are both marked with @Entity
, the classes are not enhanced when an autowired @Repository
DAO is called from a unit test. The DAO contains an inserted @PersistenceContext
to get access to the EntityManager.
If the call to the dao is commented out, the classes are enhanced as they should be.
Using spring-instrument-3.1.M2.jar on a -javaagent line.
Notes:
-
Run a mvn package with the dao call commented out and not commented out in the test class
-
Observe the difference in openjpa reporting the enhancement of classes vs. not enhancing them
-
It doesn't matter if you use a persistence.xml file or the new packagesToScan option in LocalContainerEntityManagerFactoryBean
Affects: 3.1 M2
Attachments:
- jpa-example.zip (6.77 kB)
Issue Links:
- @Configurable does not work if method with configured classes as parameter exists [SPR-8502] #13148
@Configurable
does not work if method with configured classes as parameter exists - LoadTimeWeaving not working properly in Websphere [SPR-9857] #14490 LoadTimeWeaving not working properly in Websphere
1 votes, 3 watchers