ObjectDB ObjectDB

How to retrieve the ObjectDB version number?

#1

Hi!

We need  the ObjectDB version for debug purpose/logging.

Our project supports also EclipseLink -
http://stackoverflow.com/questions/3493495/getting-database-connection-in-pure-jpa-setup
With the Connection object the Database name & version can be retrieved.

For ObjectDB, which is the best (JPA) method to get the version number?

 

Peter

 

 

 

edit
delete
#2

It is not JPA portable, but you should be able to get the version with the following code:

public static void main(String[] args)
{
    com.objectdb.jdo.PMF pmf = new com.objectdb.jdo.PMF();
    String version = pmf.getProperties().getProperty("VersionNumber");
    pmf.close();
       
    System.out.println(version);
}
ObjectDB Support
edit
delete

Reply

To post on this website please sign in.