• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which version of Hibernate does Spring support?

 
Lilly Wiesie
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could somebody tell me which version of Hibernate Spring Framework supports? Where can I get this kind of information? I was browsing Spring's site, but couldn't find it.

I am using Hibernate 3.0 Beta 3. Evidentaily Spring doesn't support this version of Hibernate yet(which is understandable since it's not in production release yet). My question is: what's the usual lagging time of Spring to Hibernate?

It seems to be a problem if a project incorporates many products from different vendors, while some of the products rely each other. In the case I mention here, we can never use the most updated version of Hibernate if we want to use Hibernate with Spring. What if Spring drops the support of Hibernate (which won't happen in the coming years I hope ), does that mean we need to modify Spring's souce code and implement our own way's support of new Hibernate? Sigh.

Thanks.

Lilly
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You make an excellent point, and I am unable to find any information on the subject either, but I haven't searched the forums yet.

I'm pretty sure Spring only supports Hibernate 2 at this time (we use 2.1.6). I do believe that you can always get a hold of the actual Hibernate Session if you need to call new APIs.
 
Lilly Wiesie
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,

The problem is that Hibernate changes the package name from net.sf.hibernate... to org.hibernate... in Hibernate 3. Now the compiler is complaining it can't find the net.sf.hibernate.* if I use the new version of Hibernate(for example I was using doInHibernate( Session s), the Session in the doInHibernate() implementation is the Session in net.sf.hibernate.Session, not the Session in org.hibernate.Session).

I installed the hibernate 2.1.18, it seems working fine.

Thanks.

Lilly
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lilly Wiesie:
The problem is that Hibernate changes the package name from net.sf.hibernate... to org.hibernate... in Hibernate 3.
Ouch! Yes, that's not going to work. Are you using features of Hibernate 3 that you can't do without? I know that's not ideal, but H3 is beta still. I would bet, though, that Spring will support H3 soon after it's released -- I just wish there was a roadmap page that had an expected date.

Of course, this means that Spring will have to have two sets of classes, one for H2 and another for H3. Not everyone will want or be able to upgrade to H3 right away.
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, I found an answer in the Users mailing list archives from Juergen Hoeller.
Hibernate3 support is planned for Spring 1.2, not to be released before 1.2 RC1 (early April).

Hibernate3 unfortunately uses a different package name (org.hibernate instead of net.sf.hibernate), so we need to provide a separate but analogous set of support classes (in org.springframework.orm.hibernate3).
 
Lilly Miaqa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Dave.

Looks like it'll be a while for us to use Hibernate 3 with Spring, probably for next project...

Lilly
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic