TopLink Wiki

Main
About
Javadoc
Forum
Resources

RecentChanges
About Wiki
Find Pages
Page Index

Set your name in
UserPreferences

Edit this page


Referenced by
DebugTopLink
UnitOfWork
Main
TopLinkStrengths
MergeCloneAPI




JSPWiki v2.0.52


DebugUnitOfWork


By far the most frequent TopLink problems come from invalid UnitOfWork usage. Mixing registered clones and unregistered instances is a common one. (Read the UnitOfWorkPrimer for more guidelines.) Fortunately that class of bugs can be diagnosed and solved with the following API:

printRegisteredObjects()
Displays currently registered objects, new objects, deleted objects.

performPartialValidation() and performFullValidation()
Both these methods simply set the validation level on the UOW. Increase the validation level manually for more info?

validateObjectSpace()
This can be used to help debugging an object-space corruption. An object-space corruption is when your application has incorrectly related a clone to an original object. This method will validate that all registered objects are in a correct state and throw an error if not, it will contain the full stack of object references in the error message. If you call this method after each register or change you perform, it will pin-point where the error was made.

validateObjectSpace: I have done exactly what is described above (call it after each change, in a debugging session), and it pointed out exactly what the problem was. Very helpful.

Need more? See DebugTopLink.


Edit this page   More info...   Attach file...
This page last changed on 03-Jun-2005 15:32:23 PDT by 64.168.145.189.