Revision 44346 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialHelper.java
H2SpatialHelper.java | ||
---|---|---|
113 | 113 |
if( startServer && server == null ) { |
114 | 114 |
String port = "9123"; |
115 | 115 |
try { |
116 |
Server theServer = Server.createTcpServer("-tcpPort", port, /*"-tcpAllowOthers",*/ "-ifExists"); |
|
116 |
Server theServer; |
|
117 |
String s = System.getProperty("H2Port"); |
|
118 |
if( s!=null ) { |
|
119 |
try { |
|
120 |
int n = Integer.parseInt(s); |
|
121 |
port = String.valueOf(n); |
|
122 |
} catch(Throwable th) { |
|
123 |
// Ignore port number, use default. |
|
124 |
} |
|
125 |
} |
|
126 |
if( System.getProperty("H2AllowOthers")!=null ) { |
|
127 |
theServer = Server.createTcpServer("-tcpPort", port, "-tcpAllowOthers", "-ifExists"); |
|
128 |
} else { |
|
129 |
theServer = Server.createTcpServer("-tcpPort", port, "-ifExists"); |
|
130 |
} |
|
117 | 131 |
theServer.start(); |
118 | 132 |
server = theServer; |
119 | 133 |
LOGGER.info("H2 Server started" ); |
120 | 134 |
LOGGER.info(" port :"+ server.getPort()); |
135 |
LOGGER.info(" URL :"+ server.getURL()); |
|
121 | 136 |
LOGGER.info(" status:"+ server.getStatus()); |
122 | 137 |
} catch (SQLException ex) { |
123 | 138 |
LOGGER.warn("H2 Server not started",ex); |
Also available in: Unified diff