ObjectDB ObjectDB

How to change properties in urls2.xml?

#1

Hello,

I am using objectdb in an embedded case with network private access to each database.
I see it exists a file name "urls2.xml".

<url>
  <main>/var/lib/tomcat7/db/myDb.odb;user=admin;password=admin</main>
  <alt>objectdb://127.0.0.1:38059/;user=$code;password=a2e54ea3-d889-41a7-953c-dabc42877742</alt>
</url>

This file is autogenerated by objectdb. And it describes the locals databases url and their port / user / password properties.

I have no control on the port and password used. :(

Does it exist a way to change urls2.xml properties ?

Adding ?port=XXXX at the end of the persistence.xml database local url doesn't work. ( Tomcat says "Connection refused" )

<properties>
    <property name="javax.persistence.jdbc.url" value="/var/lib/tomcat7/db/myDb.odb?port=3333"/>
    <property name="javax.persistence.jdbc.user" value="admin"/>
    <property name="javax.persistence.jdbc.password" value="admin"/>
</properties>

Thanks,

Xirt

edit
delete
#2
ObjectDB Support
edit
delete
#3

If i disable the history, the file urls2.xml is not updated but port and password of my databases are still randomly updated each time i am restarting tomcat :(

Xirt

edit
delete
#4

The solution in #2 is for hiding sensitive information, in case you have a problem with the urls2.xml file. Information is written to that file just to enable opening recent connections easily in the Explorer. It is not used by ObjectDB outside the Explorer, so just changing its properties will probably not help you.

Please clarify your need. Do you want to use the embedded server mode, i.e. to run a database in embedded mode and still connect to it in client-server mode?

ObjectDB Support
edit
delete
#5

My need is simple, and you are right.

I have many embedded databases and i want a private network access to each of them.

I want a connection to my databases using the Explorer or using Java PersistenceManager.
Today, copying urls located in urls2.xml allow me to connect to my databases.

Unfortunatly, when i am restarting tomcat, port and password of each database connection string is changed ... ( when i am watching urls2.xml file )

I am just asking how to have "static" url connection string.

Xirt

edit
delete
#6

Embedded server mode has not been formally released yet (and it is not documented) but you might find it in a forum discussion.

You should be able to control the port to which the embedded server is listening by adding a port argument to the url that is used to open the database in embedded mode. e.g. "objectdb:my.db?port=8888".

 

ObjectDB Support
edit
delete
#7

From my original post :

Adding ?port=XXXX at the end of the persistence.xml database local url doesn't work. ( Tomcat says "Connection refused" )

<properties>
    <property name="javax.persistence.jdbc.url" value="/var/lib/tomcat7/db/myDb.odb?port=3333"/>
    <property name="javax.persistence.jdbc.user" value="admin"/>
    <property name="javax.persistence.jdbc.password" value="admin"/>
</properties>
edit
delete
#8

Try value="objectdb:/var/lib/tomcat7/db/myDb.odb?port=3333".

ObjectDB Support
edit
delete
#9

I have just tried :

He has created a file named "myDb.odb?port=3333"

Same behaviour with url :

"objectdb://localhost/var/lib/tomcat7/db/myDb.odb?port=3333".

 

edit
delete
#10

Well ... this issue seems to have no solution ...

Should i post a feature request ?

edit
delete
#11

Sorry, it should be: "objectdb:/var/lib/tomcat7/db/myDb.odb;port=3333"
(ObjectDB expects url parameters after ; rather than ?).

ObjectDB Support
edit
delete
#12

Hello support !

Ok that works pretty well !

Thank you.

Regards,

Xirt

edit
delete

Reply

To post on this website please sign in.