Issue Details (XML | Word | Printable)

Key: NUCENHANCER-65
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andy Jefferson
Reporter: tglman
Votes: 0
Watchers: 0
Operations

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: http://www.datanucleus.org/servlet/forum/viewthread_thread,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.

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 ).

tglman made changes - 03/Feb/11 04:21 PM
Field Original Value New Value
Attachment DetachListener.txt [ 11350 ]
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
Hello,

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.

tglman made changes - 16/Jun/11 05:00 PM
Attachment DetachListener-3.0.0-trunk.txt [ 11453 ]
Andy Jefferson made changes - 17/Jun/11 09:57 AM
Attachment DetachListener.txt [ 11350 ]
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
http://datanucleus.svn.sourceforge.net/viewvc/datanucleus/documentation/accessplatform.datanucleus.org/trunk/docs/enhancer.xml?revision=12927&view=markup

Andy Jefferson made changes - 17/Jun/11 09:59 AM
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 3.0.0.m6 [ 11268 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 17/Jun/11 05:14 PM
Status Resolved [ 5 ] Closed [ 6 ]