Hi, This last post is interesting. I'm using a connection pool on Glassfish v3 and I would like to start a H2 server at the same time of the pool creation.
How to use the parameters "-tcpPort" and "-tpcAllowOthers" in this case ? Thank you. Steve On 8 mar, 16:21, Thomas Mueller <[email protected]> wrote: > Hi, > > There is a difference between "Automatic Mixed Mode" and "Mixed Mode". > > > This still confuses me, so if server Y cannot access the files on > > Server X, then how would a process on server Y connect to the mixed > > mode database on server X when it does not know the tcp port number? > > In that case, don't use ;AUTO_SERVER=true, and pick your own port. > Here an example of what you need to do: > > Process 1: > This process uses the database in embedded mode, and starts a server. > Connection embeddedConnection = > DriverManager.getConnection("jdbc:h2:/data/h2/test", "sa", "sa"); > String[] args = new String[] {"-tcpPort", "7123", "-tcpAllowOthers"}; > Server server = Server.createTcpServer(args).start(); > > Process 2: > This process can run on another machine. > Connection remoteConnection = > DriverManager.getConnection("jdbc:h2:tcp://servername:7123/data/h2/test", > "sa", "sa"); > > See alsohttp://www.h2database.com/html/tutorial.html#using_server > > Regards, > Thomas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
