openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1114) Bean Validation APIs should be an optional runtime dependency
Date Mon, 08 Jun 2009 16:06:07 GMT


Donald Woods commented on OPENJPA-1114:

It is created at the EMF level, as a ValidatorFactory can only be passed in on a createEMF()
or createContainerEMF() call as a Map property, or by trying to create a default validator
off the classpath if none were supplied.

A little background - The ValidatingLifecycleEventManager (VLEM) was created as part of OPENJPA-1068
as a way to extend the existing LifecycleEventManager (LEM) with Bean Validation (BV) specific
Previously, the LEM was created by BrokerImpl.initialize(), but we couldn't put the VLEM vs.
LEM logic there, as BrokerImpl is in openjpa-kernel and doesn't have access to any of the
JPA Spec APIs.  We also couldn't place the logic in OpenJPAConfigurationImpl, as that class
is also in openjpa-kernel and can't access the JPA Spec APIs.  So, we followed Albert's coding
for LockMgr and used the PersistenceProductDerivation to setup the configuration objects.
Now, there is still one scenario that doesn't work and will be addressed by OPENJPA-1111,
which may lead us to moving the VLEM vs LEM creation logic to some other location.

Any thoughts on where this logic (which requires access to the javax.persistence.validation
spec classes) should reside would be greatly appreciated.

> Bean Validation APIs should be an optional runtime dependency
> -------------------------------------------------------------
>                 Key: OPENJPA-1114
>                 URL:
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: validation
>            Reporter: Donald Woods
>            Assignee: Donald Woods
>             Fix For: 2.0.0-M2
>         Attachments: OPENJPA-1114.patch, OPENJPA-1114.patch
> Bean Validation APIs should be an optional runtime dependency by using reflection to
determine if the APIs are available before accessing our ValidatorImpl class or any javax.validation.*
API classes.
> openjpa-persistence will set scope=provided on geronimo-validation_1.0_spec
> openjpa-all will include the spec in the aggregated all jar
> openjpa-persistence-jdbc will not add a test dependency on the spec
> openjpa-integration will be used to test the validation support via OPENJPA-1106

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message