-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How to programatically detect Hibernate version?
PostPosted: Tue Oct 28, 2003 7:52 pm 
Newbie

Joined: Thu Sep 04, 2003 4:47 pm
Posts: 5
We've been having a problem where the primary development staff are using the latest version of Hibernate and the testing staff are *mostly* using the latest version of Hibernate. The problem being that the testing staff finds "problems" in the metadata and tells us all about what failed, occupying developer time and resources. This is also almost guaranteed to happen during deployment.

We would prefer to have something run in our app on startup that compared the running version of Hibernate against an expected version and then very loudly and clearly spelled out the problem if the environment is not configured properly. We are detecting the VM info, and we're getting version information from other frameworks, but we can't figure out how to get this info from Hibernate...

To the question: how should we programatically retrieve the Hibernate version information?

Regards,
Ross


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2003 7:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I'll change net.sf.hibernate.Environment.VERSION to public, but this isn't going to help you with older releases....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2003 9:32 pm 
Newbie

Joined: Thu Sep 04, 2003 4:47 pm
Posts: 5
Actually, that does work for older versions, since we'll trap the error from the call (the access will throw a FieldNotFoundException in old versions) and detect that condition as an older (and hence invalid) version.

Regards,
Ross


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.