Hibernate Validator
  1. Hibernate Validator
  2. HV-570

Provide an hibernate validator OSGI service exporter

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.3.0.Alpha1
    • Fix Version/s: 5.2.x
    • Component/s: engine
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      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,

        Issue Links

          Activity

          Hide
          Gunnar Morling added a comment -

          Yes, whiteboard pattern, that makes sense. Blueprint (and DS) are just means for declaring and consuming OSGi services in a more "comfortable" manner. But IMO we're better off by using the plain OSGi API as this poses the lowest requirements for consumers.

          I hope to be able to spend some time on this topic once the dust around BV 1.1 has settled a bit.

          Show
          Gunnar Morling added a comment - Yes, whiteboard pattern, that makes sense. Blueprint (and DS) are just means for declaring and consuming OSGi services in a more "comfortable" manner. But IMO we're better off by using the plain OSGi API as this poses the lowest requirements for consumers. I hope to be able to spend some time on this topic once the dust around BV 1.1 has settled a bit.
          Hide
          Hardy Ferentschik added a comment -

          Gunnar Morling, did you make any progress on this? Anything we could include within a week?

          Show
          Hardy Ferentschik added a comment - Gunnar Morling , did you make any progress on this? Anything we could include within a week?
          Hide
          Charlie Mordant added a comment -

          Hi,

          I succeed to export the Validator factory via pure OSGI services mecanism (https://github.com/Tcharl/net.osgiliath.helpers.parent/tree/master/net.osgiliath.helpers.validation.osgi.services): meaning without spring-dm, blueprint... And it was not a hard task.

          This module is Apache Licensed so feel free...

          Note that I don't think that xml contraint mapping/definitions/resources may not work properly due to the modular OSGI classloaders (but simple default constraints are OK).

          Have you got an OSGI/BVAL expert on this subject? BVAL is one of the missing things on the OSGI ecosystem.
          I know a little about OSGI, but totally noob on the BVAL stuff, so I don' t think I can help more (but if you've any question, i can answer)...

          Regards

          Show
          Charlie Mordant added a comment - Hi, I succeed to export the Validator factory via pure OSGI services mecanism ( https://github.com/Tcharl/net.osgiliath.helpers.parent/tree/master/net.osgiliath.helpers.validation.osgi.services): meaning without spring-dm, blueprint... And it was not a hard task. This module is Apache Licensed so feel free... Note that I don't think that xml contraint mapping/definitions/resources may not work properly due to the modular OSGI classloaders (but simple default constraints are OK). Have you got an OSGI/BVAL expert on this subject? BVAL is one of the missing things on the OSGI ecosystem. I know a little about OSGI, but totally noob on the BVAL stuff, so I don' t think I can help more (but if you've any question, i can answer)... Regards
          Hide
          Gunnar Morling added a comment -

          Hi Charlie, thanks for your input. We have a very basic prototype which provides Validator and ValidatorFactory as OSGi services. As you say that's a first step, but its getting more complex when taking XML based mappings, message bundles and so on into account. Generally whenever we load any classes by name (as we e.g. do for XML-declared constraints) we need to be sure to do so using the "right" classloader. I've some ideas around this and got also some stuff working; Atm. it's mainly a time/resource question of bringing this into a state where its actually usable and releasable. So any help to this is highly welcome.

          Show
          Gunnar Morling added a comment - Hi Charlie, thanks for your input. We have a very basic prototype which provides Validator and ValidatorFactory as OSGi services. As you say that's a first step, but its getting more complex when taking XML based mappings, message bundles and so on into account. Generally whenever we load any classes by name (as we e.g. do for XML-declared constraints) we need to be sure to do so using the "right" classloader. I've some ideas around this and got also some stuff working; Atm. it's mainly a time/resource question of bringing this into a state where its actually usable and releasable. So any help to this is highly welcome.
          Hide
          Hardy Ferentschik added a comment -

          Gunnar Morling,

          I've some ideas around this and got also some stuff working

          Do you have a branch on Github worth sharing?

          Show
          Hardy Ferentschik added a comment - Gunnar Morling , I've some ideas around this and got also some stuff working Do you have a branch on Github worth sharing?

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Development