Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328372

Summary: validator used by default
Product: z_Archived Reporter: James Sutherland <jamesssss>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: marcel.valovy, martin.grebac, tom.ware
Version: unspecifiedKeywords: performance
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch marcel.valovy: review+

Description James Sutherland CLA 2010-10-21 11:17:58 EDT
is a jar implementing the validator API is on the classpath (i.e. hibernate.jar now requires this), then EclipseLink will add an event to call the validator by default, even if the Entity does not use any validator.

This cause a big performance overhead in the validator calls.

If we cannot change our default, then we should log a warning if the persistence.xml did not set a validator, but we decide to enabled it (warning should tell the user if they do not require validation to disable it in the persistence.xml to avoid poor performance).

If we could detect if the Entity has any validation and not add the validator at all, that would be better.
Comment 1 Tom Ware CLA 2010-11-01 11:34:48 EDT
Setting target and priority.  See the following page for details about these
fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 2 Marcel Valovy CLA 2014-10-15 09:26:15 EDT
See:
#391566
#447339
Comment 3 Marcel Valovy CLA 2015-01-14 10:21:46 EST
Created attachment 249936 [details]
Proposed patch
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:20:16 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink