Author: desruisseaux
Date: Sat May 27 11:37:18 2017
New Revision: 1796381
URL: http://svn.apache.org/viewvc?rev=1796381&view=rev
Log:
Provide instruction about how to inspect the content of in-memory Derby database during debugging
session.
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java
sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties
Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java?rev=1796381&r1=1796380&r2=1796381&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
[UTF-8] Sat May 27 11:37:18 2017
@@ -389,7 +389,10 @@ public abstract class Initializer {
if (home != null) {
final Path file = Paths.get(home).resolveSibling("db/lib/derby.jar");
if (Files.isRegularFile(file)) {
- javadbLoader = loader = new URLClassLoader(new URL[] {file.toUri().toURL()});
+ javadbLoader = loader = new URLClassLoader(new URL[] {
+ file.toUri().toURL(),
+ file.resolveSibling("derbynet.jar").toUri().toURL()
+ });
}
}
}
Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java?rev=1796381&r1=1796380&r2=1796381&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java
[UTF-8] Sat May 27 11:37:18 2017
@@ -30,6 +30,29 @@ import static org.junit.Assume.*;
* Utility methods for creating temporary databases with Derby.
* The databases are in-memory only.
*
+ * <div class="section">Inspecting the database content in a debugger</div>
+ * Make sure that the classpath contains the {@code derbynet.jar} file in addition to {@code
derby.jar}.
+ * Then, specify the following options to the JVM (replace the 1527 port number by something
else if needed):
+ *
+ * {@preformat text
+ * -Dderby.drda.startNetworkServer=true
+ * -Dderby.drda.portNumber=1527
+ * }
+ *
+ * When the application is running, one can verify that the Derby server is listening:
+ *
+ * {@preformat text
+ * netstat -an | grep "1527"
+ * }
+ *
+ * To connect to the in-memory database, use the {@code "jdbc:derby://localhost:1527/dbname"}
URL
+ * (replace {@code "dbname"} by the actual database name.
+ *
+ * <p><b>References:</b>
+ * <ul>
+ * <li><a href="https://db.apache.org/derby/docs/10.2/adminguide/radminembeddedserverex.html">Embedded
server example</a></li>
+ * </ul>
+ *
* @author Martin Desruisseaux (Geomatys)
* @version 0.7
* @since 0.7
Modified: sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties?rev=1796381&r1=1796380&r2=1796381&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Sat May
27 11:37:18 2017
@@ -38,8 +38,9 @@ source.encoding = UTF-8
javac.source = 1.8
javac.target = 1.8
platform.active = default_platform
-run.jvmargs = -ea -Dorg.apache.sis.test.verbose=true -Dorg.apache.sis.test.extensive=true
junit.forkmode = once
+run.jvmargs = -ea -Dorg.apache.sis.test.verbose=true -Dorg.apache.sis.test.extensive=true
\
+ -Dderby.drda.startNetworkServer=true -Dderby.drda.portNumber=1527
#
# Source directories.
|