Quantcast
Channel: Revolução Java » Hibernate
Viewing all articles
Browse latest Browse all 5

Novidades Hibernate Core 4.0 Final

$
0
0

The Hibernate team is pleased to announce the release of Hibernate Core 4.0.0.Final. A lot of time and effort from many people went into this release, so thank you everyone involved!

The artifacts have all been published to the JBoss Nexus repository under the org.hibernate groupId. Or if you prefer, the download bundles are available from SourceForge in both ZIP and TGZ formats.

What’s new?

A lot of things; too many to list here. But here is a list of the major improvements done in 4.0:

  1. Initial multi-tenancy support. See http://in.relation.to/Bloggers/HibernateAndMultitenancyWebinar and http://in.relation.to/Bloggers/MultitenancyInHibernate for more information.
  2. Introduction of ServiceRegistry. This is a major change in how Hibernate builds and manages services. See the information in the Hibernate Developer Guide.
  3. Clean up of Session opening from SessionFactory
  4. Improved integration via org.hibernate.integrator.spi.Integrator and auto discovery
  5. Improved logging with i18n support and message codes
  6. Initial work on more clear split between API, SPI and implementation classes. If you import a class contained in an internal package, you know that this code is not guaranteed to work between releases.
  7. Clean up of deprecated methods, classes, etc

Also, be sure to check out the Migration Guide.

Documentation

The documentation is caught in a state of flux. The long term story is that we are trying to migrate to use DocBook v5.1 to leverage its new concept of Topics and Assemblies. Additionally we are trying to split up the content into multiple documents rather than the single document we used to produce. Plus the fact that DocBook 5.1 is itself still beta. All that is to say that the documentation is still in a working state.

  1. Hibernate Getting Started Guide is done. It is a series of quick starts and tutorials to help new users get up and running.
  2. Hibernate Reference Documentation is the old documentation. It has been kept somewhat up to date during 4.0 development, so for the time being that is the best resource for most topics.
  3. Hibernate Developer Guide is the guide for application developers using Hibernate. It is largely incomplete, except that it has the only good ServiceRegistry coverage.
  4. Hibernate EntityManager User Guide will eventually get folded into Hibernate Developer Guide (in fact some of it has been folded into Hibernate Developer Guide and Hibernate Reference Documentation already).

This is a mess, I know and I apologize.

Whats ahead?

We had originally planned a major redesign to the Hibernate metamodel (org.hibernate.mapping) code in this 4.0 release, however we decided to delay that to another release for a number of reasons. We recently agreed that those changes would be the bulk of our 5.0 release. In the interim we will have a 4.1 release as well with 2 main changes:

  1. HHH-2879 / HHH-2896 – which deal with providing an actual API for performing natural key lookups.
  2. HHH-5472 – which is a big improvement in cascade performance
  3. We will also get the docs straightened out for 4.1. Partially this is so we wont have to break links based on the 4.0 directory name. But I will get them moved up there ASAP, even before we do the 4.1 release if thats how it works out.

What about 3.6?

We simultaneously released 3.6.9, which is the final 3.6 (in fact, final 3.x) release.

Hibernate Search 4 Final

The Hibernate Search team is very happy to release Hibernate Search 4. This has been a long and huge effort from our side and we can’t wait for you to get your hands on it. This release is coming right in sync with Hibernate Core 4 Final. We made sure both work perfectly together.

There are too many new features to list them all. Let me give you the executive summary:

  • support for Hibernate Core 4
  • support for source of data/events other than Hibernate Core (which is now an optional dependency)
  • clearer split between APIs, SPIs and implementation classes
  • better log and error reporting
  • better underlying architecture – index managers allow now for one backend per index and even non directory based indexes
  • near real time search
  • optimized and cross-version compatible wire format for communications between master and slaves
  • performance improvements (more analyzer parallelization, fine-grained masters etc)
  • support for projections on custom bridges fields
  • support for @IndexedEmbedded on collections of basic types
  • easier way to work on documentation translation

Ground work

We have done a lot of ground work. Hibernate Search 4 targets Hibernate Core 4 and uses its nice integrator concept. Our code is now properly split into APIs, SPIs and implementation classes. If you import a class contained in a impl package, you know that this code is not guaranteed to work between micro versions.

To help our work in Infinispan, Hibernate Search is now truely independent of Hibernate Core – it’s an optional dependency. We have also improved error messages and logs which now come with a unique identifier like HSEARCH00024. The idea is to support internationalization and let you easily Google for an error and find posts describing the same problem.

Architecture and indexing work

We have reworked our underlying architecture to give you more flexibility and prepare for our work in Hibernate OGM. Each index now has its own backend configuration (using JMS or direct Lucene directories, syn/async etc). This also helps us index things more efficiently and in parallel. Another nice consequence is that you technically can have one master per index (in the master/slaves model) instead of one master for all indexed. This will help scalability in high pressure scenarios.

We now also support non-directory based index managers which enabled us to implement near real time search (sometimes called NRT search). Near real time search comes with a few gotchas, but can be very useful. Read more about near real time search.

To help support clusters of heterogeneous versions, we have rewritten the wire protocol used to communicate between slaves and masters. We use Avro as the serialization library which gives us the required abstraction. A nice side effect is a much smaller payload and speed improvements over the old java serialization approach.

Others

We have worked on many other things. Check out the release notes in the distribution for the full list of changes. Oh and of course it works in JBoss AS 7.

Another one I’d like to mention is the much easier process to translate the documentation to foreign languages. It’s all on the web :) If you feel like translating the doc, read more about the translation process.

Get the release

Make sure to read the migration guide if you convert an existing application. And go download Hibernate Search 4.

Many thanks to all the contributors that made this release possible whether it be via pull requests, bug reports or feedback on the forum.

Enjoy and happy holidays to everyone.

 

 

Source: http://in.relation.to/

 


Viewing all articles
Browse latest Browse all 5