[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HV-570) Provide an hibernate validator OSGI service exporter

Hardy Ferentschik (JIRA) noreply at atlassian.com
Thu Apr 12 05:51:48 EDT 2012


    [ https://hibernate.onjira.com/browse/HV-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46255#comment-46255 ] 

Hardy Ferentschik edited comment on HV-570 at 4/12/12 4:51 AM:
---------------------------------------------------------------

{quote}
Maybe we could provide a solution based on either OSGi Declarative Services or Blueprint Services. AFAIK both are standardized approaches for exporting (and consuming) OSGi services in a declarative manner (I'm not sure though, which one is preferrable), and we would avoid the dependency to Spring that way.
{quote}
Sounds reasonable. I like the idea of a standardized approach :-)

{quote}
I think exposing the default Validator and ValidatorFactory as OSGi services that way shouldn't be difficult. The other question is how to handle resources provided by the user on the class path (message bundles, but also XML based constraint mapping files). I'm not sure what the best/recommended way for that would be.
{quote}
What's about custom message interpolator, traversable resolver, etc. Basically everything you can configure in _validation.xml_? Is this service (aka these OSGi xml files) really something which should be part of the Hibernate Validator jar file or is this not something a user has to create according to his needs? Does it make sense to just export a default factory? Is there a need for different validator factories for different bundles? Does OSGi services allow to qualify a service? I am thinking about multiple BV implementation all exporting the _ValidatorFactory_ - how would I select between them?

{quote}
If we decide to provide something independently from BVAL-251 we should mark it as experimental
{quote}
+1 In fact, before doing anything I would like to see in which direction BVAL-251 goes.


      was (Author: hardy.ferentschik):
    {quote}
Maybe we could provide a solution based on either OSGi Declarative Services or Blueprint Services. AFAIK both are standardized approaches for exporting (and consuming) OSGi services in a declarative manner (I'm not sure though, which one is preferrable), and we would avoid the dependency to Spring that way.
{quote}
Sounds reasonable. I like the idea of a standardized approach :-)

{quote}
I think exposing the default Validator and ValidatorFactory as OSGi services that way shouldn't be difficult. The other question is how to handle resources provided by the user on the class path (message bundles, but also XML based constraint mapping files). I'm not sure what the best/recommended way for that would be.
{quote}
What's about custom message interpolator, trversable resolver, etc. Basically everything you can configure in _validation.xml_? Is this service (aka these OSGi xml files) really something which should be part of the Hibernate Validator jar file or is this not something a user has to create according to his needs? Does it make sense to just export a default factory?

{quote}
If we decide to provide something independently from BVAL-251 we should mark it as experimental
{quote}
+1 In fact, before doing anything I would like to see in which direction BVAL-251 goes.

  
> Provide an hibernate validator OSGI service exporter
> ----------------------------------------------------
>
>                 Key: HV-570
>                 URL: https://hibernate.onjira.com/browse/HV-570
>             Project: Hibernate Validator
>          Issue Type: New Feature
>          Components: engine
>    Affects Versions: 4.3.0.Alpha1
>            Reporter: Charlie Mordant
>            Priority: Minor
>
> Hi,
> I've created a hibernate validator OSGI service exporter.
> Feel free to use it, publish it on central (it will be cool), modify...
> You can find it in my github: https://github.com/Tcharl/org.hibernate.validation.osgi.service/
> Regards,

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list