ObjectDB ObjectDB

Configuration and Activation Code in ObjectDB 2.x

#1

Hi,

I would like to update the ObjectDB from 1.0 to 2.3.7_25. I used the License key for activating the odbee.jar file and got the activation code.It is mentioned in the side that i need to use the activation code using <activation> tag in the objectdb.conf file.

In 1.x objectDB, we are not using any objectDB.conf file, we are just using setProperty method to set the different property e.g.

properties.setProperty("javax.jdo.PersistenceManagerFactoryClass","com.objectdb.jdo.PMF");

properties.setProperty("javax.jdo.option.ConnectionURL", fileName.odb);

pmf = JDOHelper.getPersistenceManagerFactory(properties), JDOHelper.class.getClassLoader());

Can you please let me where should i use the activation code  which i got after acting the 2.0 odbee.jar. and any specific changes which i need to take care of when upgrading from 1.x to 2.x.

Thanks & regards,

Binit Bhaskar

edit
delete
#2

Information about the ObjectDB 2.x configuration file is provided in chapter 6 of the ObjectDB Manual. The location of the configuration file is discussed in the Configuration Path section on the first page of chapter 6.

The configuration file contains several sections. The activation code should be added in the database section, as the last child element of the database element:

<database>
    ...      
    <activation code="XXXX-XXXX-XXXX-XXXX-XXXX" />
</database>

Please verify that you only have objectdb.jar in the classpath and not odbee.jar, which is an old ObjectDB 1.x jar file.

ObjectDB Support
edit
delete
#3

HI, 

Thanks for your reply. As explained in my previous mail. I am not using any configuraion file in Object db 1.x.  Is it mandatory to use confilguraiton file objectdb.conf in 2.x. How can we provide this activation code without using configuration file.

And i have objectdb.jar.

Regards,

Binit

edit
delete
#4

Currently setting an activation code is only possible by using a configuration file, but it is a good idea to enable setting an activation code also using a system property in future versions.

ObjectDB Support
edit
delete
#5

Hi,

Thanks for the reply. I would like to pack the objectdb.conf file in my own jar file e.g. application.jar. In the manual, it is mentioned that i can set the conf file path through System.setProperty("objectdb.home", "/odb");

If i am packing the conf file in my jar file, what should be the path that i should give.

And my objectdb.conf file contais the following entry

<objectdb>
    <database>
        <activation code="XXXX-XXXX-XXXX-XXXX-XXXX" />
    </database>
<objectdb>

Is it fine, If i dont add other elements in the conf.

edit
delete
#6

If the configuration file is not found - ObjectDB looks for an internal XML resource at META-INF/objectdb.conf.

You can extract the objectdb.jar file and see that it includes an XML configuration file at that path as an internal resource. You may replace or edit it (e.g. you can update objectdb.jar by adding the activation code line to that internal XML resource file). Alternatively, you may try putting your own objectdb.conf file at that path in your own JAR. It may work if your JAR is preceding the objectdb.jar in the classpath.

Currently you can not set the objectdb.home or objectdb.conf system properties to reference internal resources.

An objectdb.conf that contains only the activation code is invalid so you will have to start with the default objectdb.conf and add the activation code to it.

ObjectDB Support
edit
delete
#7

HI,

Thanks for the reply. I setup the configuration and updated the objectdb.conf with the activation code.

Best regards,

Binit Bhaskar

edit
delete
#8

You are welcome. Your new question was moved to a new separate thread.

Please follow the posting instructions and create a separate forum thread per issue.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.