Hi,

Is there a way to connect to a H2 Database without specifying the
complete Path to the DB File?

my standalone application is opening an embedded/mixed h2 database,
and writes data to it.
so it connects to the db via: jdbc:h2:/whereeverinstalled/data/dbname

a webapp running inside a tomcat must now connect to the database for
reads.
so it connects to the db via: jdbc:h2:tcp//localhost/
whereeverinstalled/data/dbname;IFEXISTS=TRUE

the problem is now that the webapp does not know where,
"whereeverinstalled" is. I can't and also do not want to specify where
the Administrator will install the StandaloneApp. It should be enough
to connect via tcp and port, and the db schould know where it stores
its data. (like mysql)

Using the homedir ( ~/dbname ) is also not a feasible approch, because
the app is running under an other user than the tomcat.

I thought the baseDir parameter is meant to be used this way. But it
does not work.

I need to connect via tcp like: jdbc:h2:tcp://localhost/dbname

Any Ideas?

Thx for your help.








-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to