IP address binding

89 views
Skip to first unread message

Ming Fai Ma

unread,
Jan 5, 2008, 7:45:52 PM1/5/08
to h2-da...@googlegroups.com
hi Thomas,

H2 is a great database. I've just begun to use it for some days in my software with OpenJPA. As OpenJPA can generate schema, it is just so cool to have an in-memory database be constructed from scretch every time with almost zero configuration. :-) Thank you!
 
I come into a little problem when I've deployed the db to a multi-IP development server. May I suggest to add a IP address binding parameter so when any server is started up, if the parameter exists, it binds only to a particular IP address rather than all addresses?

e.g. for web server, only port as parameter is supported so i suppose i can't define a binding address.
-web (start the Web Server and H2 Console)
-webAllowOthers [true|false}
-webPort <port> (default: 8082)
-webSSL [true|false}

For an similar case, in JBoss, we can start with -b IP_ADDRESS to make the instance bind to a particular IP address, and then multiple servers could be started up in the same physical machine.

Thank you.

Regards,
mingfai

Thomas Mueller

unread,
Jan 8, 2008, 12:05:11 AM1/8/08
to h2-da...@googlegroups.com
Hi,

I like to avoid a command line setting for each server (-webBind,
-tcpBind, -ftpBind, -pgBind). I could add a system property as in
JBoss (-Dh2.bindAddress=...). I think a system property is enough, as
limiting to one IP address is probably quite rare. Would that be OK
for you?

Regards,
Thomas

Ming Fai Ma

unread,
Jan 8, 2008, 12:31:13 AM1/8/08
to h2-da...@googlegroups.com
Yes, for my case, I think a system property is good enough. I am wonder if there will be anybody need to start multiple h2 database in the same JVM that bind to different addresses. It doesn't seem to be a typical requirement. Thank you.

Regards,
mingfai

Peter

unread,
Jan 8, 2008, 8:19:37 AM1/8/08
to H2 Database
In my case binding the server to localhost would be nice (though I do
have external connections turned off). A system property would do the
job.

Thomas Mueller

unread,
Jan 9, 2008, 3:49:07 PM1/9/08
to h2-da...@googlegroups.com
Hi,

> I am wonder if there will be anybody need to start multiple h2 database in the same JVM
> that bind to different addresses. It doesn't seem to be a typical requirement.

Yes, I thought about that as well. I don't think so, but if this is
the case, then a regular property can be added as well (that overrides
the system property). For now, I just like to keep it as simple as
possible.

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages