Issue Details (XML | Word | Printable)

Key: NUCENHANCER-43
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Skyer Tu
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Enhancer (ARCHIVED)

Support JPA enhancement for JDK1.6 Enhancer Processor

Created: 27/Aug/09 09:39 AM   Updated: 13/Nov/10 12:19 PM   Resolved: 08/Nov/10 10:22 AM
Component/s: None
Affects Version/s: 2.0.0.m1
Fix Version/s: 2.1.2

File Attachments: 1. Java Source File EnhancerProcessor.java (8 kB)

Environment: jdk1.6.0_07

Severity: Development


 Description  « Hide
The JDK1.6 Enhancer Processor always use JDO as Enhancer API, so it cannot be used for JPA annotations.
This is because EnhancerProcessor always creates a default DataNucleusEnhancer("JDO", "ASM")

I suggest to use a processor option ( "enhanceAPI" ) to specify the API.

for example:
 javac -AenhanceAPI=JPA ....


Skyer Tu added a comment - 27/Aug/09 09:42 AM
Sample fix based on 1.1.4 source code.

Here I also specified the SupportedAnnotationTypes so that only annotationed classes will be enhanced.

Skyer Tu made changes - 27/Aug/09 09:42 AM
Field Original Value New Value
Attachment EnhancerProcessor.java [ 11004 ]
Andy Jefferson added a comment - 08/Nov/10 10:22 AM
SVN trunk has the option for enhancer api. Thx

Andy Jefferson made changes - 08/Nov/10 10:22 AM
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 2.1.2 [ 11070 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 13/Nov/10 12:19 PM
Status Resolved [ 5 ] Closed [ 6 ]