Issue Details (XML | Word | Printable)

Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andy Jefferson
Reporter: tglman
Votes: 0
Watchers: 0

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

Custom JDODetachedFieldAccessException management

Created: 03/Feb/11 04:15 PM   Updated: 17/Jun/11 05:14 PM   Resolved: 17/Jun/11 09:59 AM
Component/s: Ant task, ASM Enhancer
Affects Version/s: 2.1.3
Fix Version/s: 3.0.0.m6

File Attachments: 1. Text File DetachListener-3.0.0-trunk.txt (21 kB)

Forum Thread URL:,6504
Severity: Development

 Description  « Hide
Make a custom JDODetachedFieldAccessException management:

instead of throwing the JDODetachedFieldAccessException when file is not detached, just invoke a listener, that can be replaced with custom implementation.

Sort Order: Ascending order - Click to sort in descending order
tglman added a comment - 03/Feb/11 04:21 PM
The Last version of patch that includes the DetachListener in datanucleus-core and improves the datanucleus-enhancer with the DetachListener optional usage by input parameter (on Command Line Interface and Ant task ).

Andy Jefferson added a comment - 29/May/11 03:59 PM
Unable to apply this patch with DN 3.0 codebase; please update it to that.
Also, it uses ClassEnhancer.OPTION_GENERATE_DEFAULT_CONSTRUCTOR which is wrong.
Additionally jdoMakeDirty throws a JDODetachedAccessException yet you make no attempt to patch that. All of these need including in any patch. Thx

tglman added a comment - 16/Jun/11 05:00 PM

I have updated to datanucleus trunk and build my patch for it, in the same time i added correction to agent and RuntimeEnhancer, now support all enhancer supported parameters.

the default behaviour is the same of original bat with parameter i can change it.

In attach the patch.

Andy Jefferson added a comment - 17/Jun/11 09:59 AM
Thx. SVN trunk (core/enhancer) have this hook for access to undetached fields. Perhaps you could also contribute a simple update to the docs