Bug 328372 - validator used by default
Summary: validator used by default
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-10-21 11:17 EDT by James Sutherland CLA
Modified: 2022-06-09 10:20 EDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (32.64 KB, patch)
2015-01-14 10:21 EST, Marcel Valovy CLA
marcel.valovy: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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