How do I share an H2 database over a peer-to-peer network?

怎甘沉沦 提交于 2019-12-11 03:59:32

问题


I've been working a bit with H2 over the past couple of days, and I am having some trouble. I run the program on one computer and add some data. Then, I try to run the same program on another computer (even through a shared folder over the peer-to-peer network), and it seems as though the database is stored locally, on each computer.

Now, I have a database set up with the URL jdbc:h2:C://DatabaseTesting/NewDatabase. I couldn't get it placed in certain other folders, but I figured this one will do.

Now, if I try to run this program on multiple computers, I can already see what the issue will be. It will create the database on each computer, locally, instead of only on the "server" computer. How can I get all of the computers to link back to the "server" computer for this application?

来源:https://stackoverflow.com/questions/26667249/how-do-i-share-an-h2-database-over-a-peer-to-peer-network

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!