I am a core developer on the Hibernate products Annotations, EntityManager, Search and Validator. Currently I am focusing on the implementation JSR 303 - Bean Validation.
| Recent Entries |
|
09. May 2012
|
|
|
30. Apr 2012
|
|
|
04. Apr 2012
|
|
|
07. Mar 2012
|
|
|
06. Mar 2012
|
|
|
15. Feb 2012
|
|
|
25. Jan 2012
|
|
|
16. Nov 2011
|
|
|
03. Nov 2011
|
|
|
15. Sep 2011
|
|
|
03. Aug 2011
|
|
|
20. Jun 2011
|
|
|
09. Jun 2011
|
|
|
21. Mar 2011
|
|
|
07. Mar 2011
|
Without further ado, Hibernate Validator 4.3.0.Final is available for download in the JBoss Maven Repository under the GAV org.hibernate:hibernate-validator:4.3.0.Final or via SourceForge.
The changelog for this version does not contain much, so let me summarize the most important changes of Hibernate Validator 4.3
- The package structure got refactored to separate clearly between API, SPI and internal classes. Doing though we deprecated some classes. Make sure to migrate to the new types when upgrading to 4.3 read more
- slf4j got replaced by JBoss Logging as the main logging framework read more
- A bunch of new and improved constraints, e.g. MOD11, CNPJ, CPF and TituloEleitoral read more
- A bunch of performance and quality improvements, in particular we addressed issues around metadata caching read more
- The Hibernate Validator Annotation Processor can now be used without any additional dependencies which makes it setup easier read more
- Hibernate Validator 4.3 requires now a Java 6 or 7 runtime
Please check also the Hibernate Validator Migration Guide.
Last but not least, thanks to everyone who was lending a helping hand during the development of Hibernate Validator 4.3 (in case you wanted to help, but missed out - why not helping by translating the documentation? Join the Hibernate Validator project on Zanata and get started...).
Enjoy!
P.S. In case you are waiting for a Validator release which aligns with the first draft of Bean Validation 1.1, have an eye on the JBoss snapshot repository. An initial hibernate-validator-5.0.0-SNAPSHOT won't be far off.
Hibernate Validator 4.3.0.CR1 has just arrived. This release is hopefully the last stepping stone to 4.3.0.Final. As mentioned before we want to get 4.3 out as fast as possible, so that we can start working on Hibernate Validator 5 (aligning with Bean Validation 1.1).
Aside of some minor bug fixes (HV-572, HV-573, HV-574, HV-575), this release is all about performance. We wanted to make sure that you get a Hibernate Validator which is at least as fast as the previous versions. To prove that, we introduced a new module performance which allows us to easier compare the performance of different validator releases. For more information have a look at this readme.
On important fact which is a side effect of the introduction of JBoss Logging is that even though the API of Validator 4.3 is backwards compatible with 4.2, you need now a Java 6 runtime environment (see also HV-569 and HV-481). We believe this should not a big issue and it is time to move on, but if you think differently, speak now or forever hold your peace! ;-)
Hibernate Validator 4.3.0.CR1 is available for download in the JBoss Maven Repository under the GAV org.hibernate:hibernate-validator:4.3.0.CR1 or via SourceForge. Read the changelog for a list of all chnges and make sure to check the Hibernate Validator Migration Guide as well.
Let us know what you think via the forum or the project issue tracker.
Enjoy!
Moving along the road to a Hibernate Validator 4.3 release I am happy to announce the release of Hibernate Validator 4.3.0.Beta1.
One of our foci this time around was to address existing caching issues. HV-479 addresses the problem that the constraint metadata for a given class would be cached in the so called BeanMetaDataManager without an appropriate eviction policy. In most cases this should not be a problem, but for long running applications with for example hot redeploys it could be. We resolved this issue by introducing SoftLimitMRUCache which has an upper bound for the cached metadata.
HV-564 is another caching related issue. Initially ConstraintValidator instances were only cached if they where created by the Hibernate Validator specific ConstraintValidatorFactoryImpl. Now caching occurs also for custom ConstraintValidatorFactorys.
Two other interesting issues are HV-563 and HV-517. The former allows you to reuse your Configuration instance and call Configuration#buildValidatorFactory() multiple times. The latter introduces the concept of ignoring annotations to the programmatic API. In the XML configuration it has always been possible to do something like this:
<constraint-mappings
xmlns="http://jboss.org/xml/ns/javax/validation/mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd">
<bean class="my.package.MyClass" ignore-annotations="true">
</bean>
</constraint-mappings>
Via the programmatic API this is now possible via:
// ...
HibernateValidatorConfiguration configuration = ...
ConstraintMapping mapping = configuration.createConstraintMapping();
mapping.type( MyClass.class ).ignoreAllAnnotations();
// ...
Of course ignoreAllAnnotations() is also available on the property level of the API.
Another important focus was on HV-561. This issue identifies the API methods which will change between Hibernate Validator 4.3 to 5 (as much as we can foresee this at the moment). Causes for these changes are Bean Validation 1.1 and the separation between API/SPI and internal packages. This has already been discussed in the previous release blog. Right now we have two new packages org.hibernate.validator.spi.group and org.hibernate.validator.spi.resourceloading containing DefaultGroupSequenceProvider and ResourceBundleLocator respectively. The old versions of these interfaces have been deprecated and will be removed in HV 5. On a side note, right now we have the following packages:
org.hibernate.validator.cfg
org.hibernate.validator.constraints
org.hibernate.validator.group
org.hibernate.validator.internal
org.hibernate.validator.messageinterpolation
org.hibernate.validator.method
org.hibernate.validator.resourceloading
org.hibernate.validator.spi
Would it make sense to have (by pushing cfg, constraints, group, messageinterpolation, method and resourceloading one level down):
org.hibernate.validator.api
org.hibernate.validator.internal
org.hibernate.validator.spi
Obviously such a move would break much more client code than the current structure. Let us know what you think.
Last but not least, there are also some news from the Hibernate Validator Annotation Processor which can now be used without any additional dependencies (HV-457). This will make it easier to configure the processor within your build as well as IDE.
Hibernate Validator 4.3.0.Beta1 is available via the JBoss Maven Repository under the GAV org.hibernate:hibernate-validator:4.3.0.Beta1 or via SourceForge. The changelog is available here and make sure to check the Hibernate Validator Migration Guide as well.
Feedback is always welcome via the Validator Forum and the project issue tracker.
Enjoy!
A question which came up recently a lot was the question about the release plan for Hibernate Validator 4.3. It is time for an answer.
I used to say that Validator 4.3 will align with Bean Validation 1.1, incorporating any changes required for this specification update. Work on BV 1.1 is still in full swing and it is still time to raise your voice for your long missed validation feature. Check out beanvalidation.org for more information.
Back to Hibernate Validator though. Over the last few months we incorporated a bunch of useful changes and bug fixes into the code base. For example all string based ConstraintValidators work now on any subclass of CharSequence (HV-502) and the email validator now supports internationalized domain names (HV-472, Java 6 required). Or check out the new generic MOD11 constraint (HV-491) and its application in the new constraints CNPJ, CPF and TituloEleitoral (used for Brazilian individual taxpayer and voting registration numbers). We also have some performance improvements via HV-550 and HV-515.
As you can see quite a bunch of useful changes which we want to release as soon as possible. We also want to offer these improvements for users who don't want to upgrade to Bean Validation 1.1 right away (some of the expected changes will break backwards compatibility with Hibernate Validator 4.2). For this reason we just released Hibernate Validator 4.3.0.Alpha1 with the plan to move to a final release as fast as possible. Two more issues are worth mentioning though: HV-481 and HV-484. The former is the switch to JBoss Logging and the latter is the start of a package refactoring which will (once completed) introduce a clear separation between API/SPI and internal parts on a package level. This change is in accordance with the changes already introduced by the other Hibernate projects. Have a look at the Hibernate Validator Migration Guide to see what these changes imply.
Hibernate Validator 4.3.0.Alpha1 is available via the JBoss Maven Repository under the GAV org.hibernate:hibernate-validator:4.3.0.Alpha1 or via SourceForge. The changelog is available here. Feedback is welcome via the Validator Forum and the issue tracker.
As a result, Hibernate Validator 5 will become the reference implementation of Bean Validation 1.1.
Thanks to all the people suggesting features and reporting bugs. Special thanks to George Gastaldi, Kevin Pollet and Gunnar Morling for your continuous commitment. You guys rock!
Enjoy!
I just wanted to announce the promotion of the Hibernate Metamodel Generator 1.2.0.CR1 release to 1.2.0.Final.
There is nothing more to say, except that you can download the release from the JBoss Maven repo or from SourceForge.
Enjoy!
| Showing 1 to 5 of 40 blog entries |
|
|