Red Hat

In Relation To

The Hibernate team blog on everything data.

JBoss Community Asylum - minishift

Posted by    |       |    Tagged as asylum minishift

Here is an episode we recorded a late evening with Hardy Ferentschik on the topic of minishift.

Episode 45 - Show notes and podcast.

Enjoy!

Hibernate ORM 5.1.9.Final released

Posted by    |       |    Tagged as Hibernate ORM Releases

We decided to do another release of the 5.1 series to fix some bugs to be included in an upcoming version of WildFly. This may be the last release of the 5.1 series, so we recommend that you migrate to 5.2 for future bugfixes.

Hibernate ORM 5.1.9.Final:

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

Hibernate Community Newsletter 14/2017

Posted by    |       |    Tagged as Discussions Hibernate ORM

Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.

Articles

In this article, Arpit Jain writes about the differences between persist and merge in relation to JPA transaction boundaries. For more details about the persist and merge entity state transitions, check out this article as well.

For functional programming aficionados, TehDev wrote a very interesting article about refactoring towards a transaction monad.

If you’re using Payara Server, check out this article about how you can integrate it with Hibernate 5.

Baeldung published an article about the differences between persist, merge, update, as well as saveOrUpdate.

If you’re using Grails, Michael Scharhag shows you how you can make use of Hibernate filters.

JPA 2.2 has been released, but Hibernate has been supporting Java 1.8 Date and Time, Hibernate-specific @Repeatable annotations and, since 5.1, Java 1.8 streams are supported as well.

If you’re using MySQL, Thorben Janssen has written a list of tips to take into consideration when using Hibernate. If you are interested in more details, then check out the following articles as well:

Debezium is an open-source project developed by Red Hat which allows you to capture transaction events from RDBMS like MySQL, PostgreSQL or NoSQL solutions such as MongoDB and push them to Apache Kafka. For more details, check out this tutorial about using Debezium, MySQL and Kafka.

We just published Hibernate Search version 5.8.0.Beta4, with AWS integration as well as bugfixes and improvements over 5.8.0.Beta3.

Hibernate Search 5.8.x, just as 5.7.x, is only compatible with Hibernate ORM 5.2.3 and later.

If you need to use Hibernate ORM 5.0.x or 5.1.x, use the older Hibernate Search 5.6.x.

5.8 status

We completed most of the work on new features and improvements for 5.8, and are now mainly working on performance improvements for the Elasticsearch integration.

As a consequence, you can expect the next version we’ll publish to be a candidate release.

Once the CR is out, we will only fix bugs, and functional improvements will have to wait until the next minor release.

So if you plan on using AWS integration, normalizers, analyzer providers, or SPIs for integration of dependency injection frameworks, now’s the last time to ask for improvements before the actual release!

What’s new in Beta4?

AWS integration

Building on the new SPIs introduced in Beta3, we added a new module allowing you to very simply wire your Hibernate Search instance to an AWS-hosted Elasticsearch cluster using Amazon’s proprietary IAM authentication mechanism.

You can find more information about how to use this integration in the reference documentation.

And more!

A summary of other notable changes:

  • HSEARCH-2783: the buffer_size_on_copy configuration property has been deprecated, because we now use Java NIO for file copy and thus don’t need explicit buffering anymore.

  • HSEARCH-2785: using .phrase() and .keyword() on the QueryBuilder for normalized fields no longer fails with Elasticsearch.

  • HSEARCH-2776 and HSEARCH-2777: javax.transaction dependencies are no longer incorrectly marked as optional in the OSGi manifest.

For a full list of changes since 5.8.0.Beta3, please see the release notes.

How to get this release

All versions are available on Hibernate Search’s web site.

Ideally use a tool to fetch it from Maven Central; these are the coordinates:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-orm</artifactId>
   <version>5.8.0.Beta4</version>
</dependency>

To use the experimental Elasticsearch integration you’ll also need:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-elasticsearch</artifactId>
   <version>5.8.0.Beta4</version>
</dependency>

And to also use Amazon’s proprietary IAM authentication mechanism to access your Elasticsearch cluster you’ll also need:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-elasticsearch-aws</artifactId>
   <version>5.8.0.Beta4</version>
</dependency>

Downloads from Sourceforge are available as well.

Feedback, issues, ideas?

To get in touch, use the following channels:

We just released the Bean Validation 2.0 release train (e.g. the specification, the API and the TCK) for the Final Approval Ballot and, as usual, we release a compatible version of Hibernate Validator shortly after: here comes Hibernate Validator 6.0.0.CR3.

What’s new since CR2

As the final release of Bean Validation is getting closer, we mainly focused on keeping up with the latest spec clarifications and improving a few things here and there.

Here are the highlights of this release:

  • We removed the support for constraints and cascading on container elements of arrays as we decided to not include it in the spec. Basically, it was not possible to be backward compatible with Bean Validation 1.1 and introduce this support, considering how array annotations are handled according to the JLS. As we don’t think there’s much traction for it, we stayed on the safe side for now.

  • It is now possible to use expression language in OSGi environments without having to specify an external class loader: no more headaches trying to get the javax.el based message interpolation working!

  • Speaking of OSGi, Toni Menzel contributed a fix to the Paranamer Karaf feature. Thanks!

The complete list of fixed issues can be found in the release notes.

Getting 6.0.0.CR3

To get the release with Maven, Gradle etc. use the GAV coordinates org.hibernate.validator:{hibernate-validator|hibernate-validator-cdi|hibernate-validator-annotation-processor}:6.0.0.CR3. Note that the group id has changed from org.hibernate (Hibernate Validator 5 and earlier) to org.hibernate.validator (from Hibernate Validator 6 onwards).

Alternatively, a distribution bundle containing all the bits is provided on SourceForge (TAR.GZ, ZIP).

What’s next?

So, once the Bean Validation 2.0 gets approved, we will release the final of Hibernate Validator 6.0.0.

Until then, we will work on completing the documentation.

Feedback, issues, ideas?

To get in touch, use the usual channels:

We just released a CR2 of the Bean Validation 2.0 release train (e.g. the specification, the API and the TCK) and, as usual, we release a compatible version of Hibernate Validator shortly after: here comes Hibernate Validator 6.0.0.CR2.

What’s new since CR1

As the final release of Bean Validation is getting closer, we mainly focused on keeping up with the latest spec clarifications and on updating the documentation.

Here are the highlights of this small release:

  • The from of @ConvertGroup and <convert-group> is now optional: it defaults to the Default group.

  • Some last minute changes were made in the Bean Validation API on the naming of the value unwrapping related method: we updated Hibernate Validator accordingly.

  • We made a first pass on the documentation: some things are still missing (mostly about the new value extraction feature) but the documentation should not contain outdated information anymore.

The complete list of fixed issues can be found in the release notes.

Getting 6.0.0.CR2

To get the release with Maven, Gradle etc. use the GAV coordinates org.hibernate.validator:{hibernate-validator|hibernate-validator-cdi|hibernate-validator-annotation-processor}:6.0.0.CR2. Note that the group id has changed from org.hibernate (Hibernate Validator 5 and earlier) to org.hibernate.validator (from Hibernate Validator 6 onwards).

Alternatively, a distribution bundle containing all the bits is provided on SourceForge (TAR.GZ, ZIP).

Feedback, issues, ideas?

To get in touch, use the usual channels:

What’s next?

As we published the Proposed Final Draft, we are in the final stretch for Bean Validation 2.0, so if you spot any remaining issues or shortcomings in the spec draft, please let us know as soon as possible.

Testing the Reference Implementation is also a good way to help us finalize both the specification and the next major version of Hibernate Validator, now is the time!

Hibernate Community Newsletter 13/2017

Posted by    |       |    Tagged as Discussions Hibernate ORM

Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.

Presentations

Check out the Virtual JUG presentation about High-Performance Java Persistence and Hibernate. If you are using a relational database, then you should definitely watch this session and learn how to run your enterprise application at warp speed.

Articles

The @Transactional annotation allows for a clear separation between business logic and transaction handling. However, just because you are using a very convenient abstraction, it does not mean you don’t have to understand how it works behind the scenes. Check out the "how does Spring @Transactional really work" article from jHades to know more on this topic.

If you’re using Payara Java EE Application Server and want to make it work with Hibernate 5, then you should definitely check out this tutorial.

I also wrote three articles that cover JPA 2.2 Date and Time types, Hibernate Array types, as well as CDC using Debezium.

Time to upgrade

Hibernate Validator 6.0.0.CR1 is out with Bean Validation 2.0.0.CR1 support.

Hibernate ORM 5.1.8 has been released, so, if you’re using the 5.1 branch, you should definitely give it a try.

The Proposed Final Draft (CR1) of Bean Validation 2.0 has been released earlier this week and it is time to release a version of the Reference Implementation compatible with it: here comes Hibernate Validator 6.0.0.CR1.

Note that Hibernate Validator 6 requires JDK 8 or above.

What’s new since Beta2

As the final release of Bean Validation is getting closer, we mainly focused on keeping up with the latest spec clarifications, fixing bugs and improving overall consistency.

We also added/improved a few things:

  • After a community survey, we decided to create specific annotations for @PositiveOrZero, @NegativeOrZero, @PastOrPresent and @FutureOrPresent instead of using annotation attributes.

  • CDI is now enabled for ValueExtractors loaded via the ServiceLoader. We also fixed a class loading issue in that area.

  • The programmatic API for @NotBlank, @NotEmpty and @Email is now using the new Bean Validation constraints instead of the Hibernate Validator specific ones.

  • We added automatic module names for the new Java 9 module system. You can find them in our reference documentation.

Finally, we made quite a lot of improvements to our testing infrastructure but you shouldn’t notice it (except if you come join us!).

The complete list of fixed issues can be found in the release notes.

Getting 6.0.0.CR1

To get the release with Maven, Gradle etc. use the GAV coordinates org.hibernate.validator:{hibernate-validator|hibernate-validator-cdi|hibernate-validator-annotation-processor}:6.0.0.CR1. Note that the group id has changed from org.hibernate (Hibernate Validator 5 and earlier) to org.hibernate.validator (from Hibernate Validator 6 onwards).

Alternatively, a distribution bundle containing all the bits is provided on SourceForge (TAR.GZ, ZIP).

Feedback, issues, ideas?

To get in touch, use the usual channels:

What’s next?

As we published the Proposed Final Draft, we are in the final stretch for Bean Validation 2.0, so if you spot any remaining issues or shortcomings in the spec draft, please let us know as soon as possible.

Testing the Reference Implementation is also a good way to help us finalize both the specification and the next major version of Hibernate Validator, now is the time!

Hibernate ORM 5.1.8.Final released

Posted by    |       |    Tagged as Hibernate ORM Releases

We decided to do another release of the 5.1 series to fix some bugs to be included in an upcoming version of WildFly. This may be the last release of the 5.1 series, so we recommend that you migrate to 5.2 for future bugfixes.

Hibernate ORM 5.1.8.Final:

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

Hibernate Community Newsletter 12/2017

Posted by    |       |    Tagged as Discussions Hibernate ORM

Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.

Presentations

Don’t miss the Virtual JUG presentation about High-Performance Java Persistence and Hibernate. If you are using a relational database, then you should definitely attend this session, and, the best thing about it, you can watch it in the comfort of your home.

Articles

The pick of this edition is this article by Arnold Galovics which reiterates the benefits of using projections when fetching data.

JPA inheritance is a very useful addition to the standard. However, sometimes entity inheritance is not very well understood or applied, so, in this series of articles, I tried to offer a different perspective to why we need entity inheritance in the first place, and what is the best way to do it:

Time to upgrade

Hibernate Search has managed to release three final versions:

  • 5.5.7.Final

  • 5.6.2.Final

  • 5.7.1.Final

as well as a 5.8.0.Beta3 release.

back to top