Tags
Authors
Hibernate Core 3.3.1 has just been released with its artifacts published to the JBoss Maven Repository. This release fixed a serious issue with CurrentSessionContext (SessionFactory.getCurrentSession()) when running on IBM WebSphere. It also includes quite a few improvements to the enhanced id generators. For details about all the changes in this release, check out it's changelog
3.3.0.GA got released the other day with an uncaught problem. A public method got removed from some of the events (specifically PreInsertEvent and PreUpdateEvent) which is causing problems with Hibernate Validator and which will probably cause problems for any applications utilizing custom listeners for those events.
Hibernate 3.3.0.GA has been released. A big thanks to everyone who helped us get here.
Moving Hibernate source code to our new Subversion home is done. Both developer and annonymous access have been set up. Currently, web access is only available via the Apache module which is less than ideal. We have been told that either Fisheye or ViewCVS access over the Subversion repsoitory will be setup soon.
A bug report was recently
opened in Hibernate's JIRA stating that Hibernate incorrectly handles deadlock scenarios.
The basis for the report was an example in the /Pro Hibernate 3/ book (Chapter 9). For
those perhaps not familiar with the term deadlock
, the basic gist is that two processes
each hold resource locks that the other needs to complete processing. While this phenomena
is not restricted to databases, in database terms the idea is that the first process (P1)
holds a write lock on a given row (R1) while the second process (P2) holds a write lock on
another row (R2). Now, to complete its processing P1 needs to
acquire a write lock on R2, but cannot do so because P2 already holds its write lock.
Conversely, P2 needs to acquire a write lock on R1 in order to complete its processing,
but cannot because P1 already holds its write lock. So neither P1 nor P2 can complete
its processing because each is indefinitely waiting on the other to release the needed
lock, which neither can do until its processing is complete. The two processes are said
to be deadlocked in this situation.
As I mentioned in my previous blog about Bulk Operations , both UPDATE and DELETE statements are challenging to handle against single entities contained across multiple tables (not counting associations), which might be the case with:
The EJB3 persistence specification calls for implementors to
support Bulk Operations
in EJB-QL (the EJB Query Language
). As part of Hibernate's implementation of
EJB3 persistence, HQL (the Hibernate Query Language
: which is a superset of EJB-QL) needed to support
these Bulk Operations
. This support is now code complete, even going beyond what is offered in the EJB3
persistence specification. There is one task outstanding against this bulk operation support in HQL, but
this is completely beyond the scope of the support called for in the EJB3 persistence specification.
I'll blog about this one later as it simply rocks ;)
New to Hibernate 3.0.1 is the SessionFactory.getCurrentSession() method. It allows application developers to delegate tracking of current sessions to Hibernate itself. This is fairly trivial functionality, but stuff just about any user of Hibernate had to implement themselves, or rely on third party stuff to do for them. Let's take a look at how this is implemented in Hibernate and how it might be useful.
Another major change in Hibernate3 is the evolution to use an event and listener paradigm as its core processing model. This allows very fine-grained hooks into Hibernate internal processing in response to external, application initiated requests. It even allows customization or complete over-riding of how Hibernate reacts to these requests. It really serves as an expansion of what Hibernate tried to acheive though the earlier Interceptor, Lifecycle, and Validatable interafaces.