You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by jt...@apache.org on 2006/03/03 23:26:18 UTC

svn commit: r382947 - in /db/derby/site/trunk: build/site/papers/DerbyTut/ src/documentation/content/xdocs/papers/DerbyTut/

Author: jta
Date: Fri Mar  3 14:26:17 2006
New Revision: 382947

URL: http://svn.apache.org/viewcvs?rev=382947&view=rev
Log:
Updated the DerbyTut network server writeup:
(1) Removed link to http://issues.apache.org/jira/browse/DERBY-701
now that the fixed doc is available.
(2) Improved introductory wording.
(3) Corrected the bogus sysinfo connection to a database in Figure 3.

Modified:
    db/derby/site/trunk/build/site/papers/DerbyTut/embedded_server.png
    db/derby/site/trunk/build/site/papers/DerbyTut/ns_intro.html
    db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/embedded_server.aart
    db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/ns_intro.xml

Modified: db/derby/site/trunk/build/site/papers/DerbyTut/embedded_server.png
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/papers/DerbyTut/embedded_server.png?rev=382947&r1=382946&r2=382947&view=diff
==============================================================================
Binary files - no diff available.

Modified: db/derby/site/trunk/build/site/papers/DerbyTut/ns_intro.html
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/papers/DerbyTut/ns_intro.html?rev=382947&r1=382946&r2=382947&view=diff
==============================================================================
--- db/derby/site/trunk/build/site/papers/DerbyTut/ns_intro.html (original)
+++ db/derby/site/trunk/build/site/papers/DerbyTut/ns_intro.html Fri Mar  3 14:26:17 2006
@@ -251,18 +251,19 @@
 <h2 class="boxed">Introduction</h2>
 <div class="section">
 <p>
-The "<a href="embedded_intro.html">Embedded Derby</a>" section
-shows how two applications running in different JVMs,
-<span class="codefrag">ij</span> and <span class="codefrag">SimpleApp</span>,
-can't use the Derby Embedded JDBC driver to connect
-to the same <span class="codefrag">derbyDB</span> database simultaneously
-because only one JVM can access a given database.
+As explained in
+the "<a href="embedded_intro.html">Embedded Derby</a>" section,
+an application can embed Derby, 
+which means that the Derby engine runs in the same JVM as the application.
 </p>
 <p>
-The solution is to introduce a framework that embeds Derby and handles
-database requests from multiple applications.
-The Derby Network Server is such a framework. It is a embedded Derby 
-application that manages requests from network clients,
+However, an application can also access a Derby database using the more
+familiar client/server mode.
+This is achieved <em>via</em> a framework that embeds Derby and handles
+database requests from applications, including applications running in
+different JVMs on the same machine or on remote machines.
+The Derby Network Server is such a framework. It embeds Derby 
+and manages requests from network clients,
 as depicted in Figure 2.
 </p>
 <p>
@@ -287,7 +288,7 @@
 </div>
 
 
-<a name="N1003A"></a><a name="ns"></a>
+<a name="N10034"></a><a name="ns"></a>
 <h2 class="boxed">Derby Network Server</h2>
 <div class="section">
 <p>
@@ -295,7 +296,7 @@
    <a href="install_software.html#set_derby_install">DERBY_INSTALL</a>
    environment variable.
 </p>
-<a name="N10047"></a><a name="ns_config_env"></a>
+<a name="N10041"></a><a name="ns_config_env"></a>
 <h3 class="boxed">Configure environment</h3>
 <p>To start or stop the Network Server,
       set your <span class="codefrag">CLASSPATH</span> to include the jar files listed below:</p>
@@ -337,7 +338,7 @@
 $ cd $DERBY_INSTALL/frameworks/NetworkServer/bin
 $ . setNetworkServerCP.ksh
 </p>
-<a name="N10088"></a><a name="start_ns"></a>
+<a name="N10082"></a><a name="start_ns"></a>
 <h3 class="boxed">Start Network Server</h3>
 <p>
 Start the Network server by executing the
@@ -365,7 +366,7 @@
 </div>
 
 
-<a name="N100AA"></a><a name="ns_sample"></a>
+<a name="N100A4"></a><a name="ns_sample"></a>
 <h2 class="boxed">Sample Application</h2>
 <div class="section">
 <p>
@@ -373,7 +374,7 @@
    <a href="install_software.html#set_derby_install">DERBY_INSTALL</a>
    environment variable.
 </p>
-<a name="N100B7"></a><a name="configure_ns_client"></a>
+<a name="N100B1"></a><a name="configure_ns_client"></a>
 <h3 class="boxed">Configure environment to use Derby Network Client JDBC driver</h3>
 <p>To use the Derby Network Client JDBC driver,
       set your <span class="codefrag">CLASSPATH</span> to include the jar files listed below:</p>
@@ -413,7 +414,7 @@
 <p class="code-block">UNIX:
 $ . setNetworkClientCP.ksh
 </p>
-<a name="N100FB"></a><a name="ij_ns_client"></a>
+<a name="N100F5"></a><a name="ij_ns_client"></a>
 <h3 class="boxed">Test network server connection with ij</h3>
 <p>
    An <strong>embedded</strong> 
@@ -462,7 +463,7 @@
 </li>
    
 </ul>
-<a name="N1013D"></a><a name="copy_ns_client"></a>
+<a name="N10137"></a><a name="copy_ns_client"></a>
 <h3 class="boxed">Copy sample application</h3>
 <p>
    This section uses the same sample application that the 
@@ -483,7 +484,7 @@
    create and connect to the database using the Derby Network Client JDBC
    driver instead.
    </p>
-<a name="N10159"></a><a name="ns_lookat_code"></a>
+<a name="N10153"></a><a name="ns_lookat_code"></a>
 <h3 class="boxed">A quick look at the code</h3>
 <p>
    The <span class="codefrag">SimpleApp.java</span> application spends most of its time
@@ -494,7 +495,7 @@
    The "<a href="embedded_intro.html#em_lookat_code">Embedded Derby</a>"
    section shows how to turn the same code into an embedded application.
    </p>
-<a name="N10169"></a><a name="jdbc_ns_client"></a>
+<a name="N10163"></a><a name="jdbc_ns_client"></a>
 <h4>Load the Client JDBC Driver</h4>
 <p>
    When executed with the <span class="codefrag">derbyclient</span> argument,
@@ -505,7 +506,7 @@
 ...
 Class.forName(driver).newInstance();
 </p>
-<a name="N1017D"></a><a name="url_ns_client"></a>
+<a name="N10177"></a><a name="url_ns_client"></a>
 <h4>Get a Network Server Connection</h4>
 <p>
    When executed with the <span class="codefrag">derbyclient</span> argument,
@@ -520,7 +521,7 @@
    That connection URL, fully constructed, looks like this:
    </p>
 <p class="code-block">jdbc:derby://localhost:1527/derbyDB;create=true</p>
-<a name="N1019B"></a><a name="ns_client_noshutdown"></a>
+<a name="N10195"></a><a name="ns_client_noshutdown"></a>
 <h4>Don't shut Derby down</h4>
 <p>
    If you look at the <span class="codefrag">SimpleApp.java</span> code you'll notice that it
@@ -529,13 +530,13 @@
    other applications might be accessing
    the same database you are; so, don't shut down the databases or Derby.
    </p>
-<a name="N101AC"></a><a name="compile_ns_client"></a>
+<a name="N101A6"></a><a name="compile_ns_client"></a>
 <h3 class="boxed">Compile Sample Application</h3>
 <p>
    Compile the sample application as shown below:
    </p>
 <p class="code-block">javac SimpleApp.java</p>
-<a name="N101BA"></a><a name="run_ns_client"></a>
+<a name="N101B4"></a><a name="run_ns_client"></a>
 <h3 class="boxed">Run Sample Application</h3>
 <p>
    Run the sample application like this:
@@ -568,7 +569,7 @@
 </div>
 
 
-<a name="N101DE"></a><a name="stop_ns"></a>
+<a name="N101D8"></a><a name="stop_ns"></a>
 <h2 class="boxed">Stop Network Server</h2>
 <div class="section">
 <p>
@@ -592,10 +593,10 @@
 </div>
 
 
-<a name="N101FC"></a><a name="ns_next_steps"></a>
+<a name="N101F6"></a><a name="ns_next_steps"></a>
 <h2 class="boxed">Next Steps</h2>
 <div class="section">
-<a name="N10202"></a><a name="Network+Server+Options"></a>
+<a name="N101FC"></a><a name="Network+Server+Options"></a>
 <h3 class="boxed">Network Server Options</h3>
 <p>
 By default, the Derby Network Server only accepts requests from the
@@ -613,8 +614,8 @@
   
 <li>
 <a href="http://db.apache.org/derby/docs/dev/adminguide/tadminnetservrun.html">Run in the Java 2 Security Manager</a> for increased security, 
-      which we strongly recommend
-      (<a class="external" href="http://issues.apache.org/jira/browse/DERBY-701#action_12360550">here is a working sample policy file</a>)</li>
+      which we strongly recommend.
+  </li>
 
 </ul>
 <p>
@@ -622,7 +623,7 @@
 <a href="http://db.apache.org/derby/manuals">Derby Server and 
 Administration Guide</a>.
 </p>
-<a name="N1022B"></a><a name="Embedded+Server"></a>
+<a name="N10221"></a><a name="Embedded+Server"></a>
 <h3 class="boxed">Embedded Server</h3>
 <p>
 Up until this point,

Modified: db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/embedded_server.aart
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/embedded_server.aart?rev=382947&r1=382946&r2=382947&view=diff
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/embedded_server.aart (original)
+++ db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/embedded_server.aart Fri Mar  3 14:26:17 2006
@@ -10,15 +10,15 @@
 |     | +---+---+ | | +---------+
 |     | |Derby  +-+-+
 |     | |Network| |
-|     | |Server +-+-+ +---JVM----+
-|     | +-+-----+ + | |+-------+ |
-|    ++---++      | | ||sysinfo| |
-|    |JDBC |      | | |+---+---+ |
-|    +-----+      | | | +--+----+|
-|    |DERBY|      | | | |Derby  ||
-|    +--+--+      | +-+-+Network||
-+-------+---------+   | |Client ||
-        |  +--------+ | +-------+|
-        \+-+database| +----------+
+|     | |Server +-+-+ +---JVM-----+
+|     | +-+-----+ + | |+---------+|
+|    ++---++      | | ||SimpleApp||
+|    |JDBC |      | | |+---+-----+|
+|    +-----+      | | | +--+----+ |
+|    |DERBY|      | | | |Derby  | |
+|    +--+--+      | +-+-+Network| |
++-------+---------+   | |Client | |
+        |  +--------+ | +-------+ |
+        \+-+database| +-----------+
            |files   |
            +--------+

Modified: db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/ns_intro.xml
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/ns_intro.xml?rev=382947&r1=382946&r2=382947&view=diff
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/ns_intro.xml (original)
+++ db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/ns_intro.xml Fri Mar  3 14:26:17 2006
@@ -9,19 +9,20 @@
 <section id="ns_intro">
 <title>Introduction</title>
 <p>
-The "<a href="embedded_intro.html">Embedded Derby</a>" section
-shows how two applications running in different JVMs,
-<code>ij</code> and <code>SimpleApp</code>,
-can't use the Derby Embedded JDBC driver to connect
-to the same <code>derbyDB</code> database simultaneously
-because only one JVM can access a given database.
+As explained in
+the "<a href="embedded_intro.html">Embedded Derby</a>" section,
+an application can embed Derby, 
+which means that the Derby engine runs in the same JVM as the application.
 </p>
 
 <p>
-The solution is to introduce a framework that embeds Derby and handles
-database requests from multiple applications.
-The Derby Network Server is such a framework. It is a embedded Derby 
-application that manages requests from network clients,
+However, an application can also access a Derby database using the more
+familiar client/server mode.
+This is achieved <em>via</em> a framework that embeds Derby and handles
+database requests from applications, including applications running in
+different JVMs on the same machine or on remote machines.
+The Derby Network Server is such a framework. It embeds Derby 
+and manages requests from network clients,
 as depicted in Figure 2.
 </p>
 
@@ -408,8 +409,8 @@
   <li><a href="http://db.apache.org/derby/docs/dev/adminguide/tadminappssettingportnumbers.html">Listen on a port other than the default</a>.</li>
   <li><a href="http://db.apache.org/derby/docs/dev/adminguide/cadminnetservsecurity.html">Accept requests from outside the localhost.</a></li>
   <li><a href="http://db.apache.org/derby/docs/dev/adminguide/tadminnetservrun.html">Run in the Java 2 Security Manager</a> for increased security, 
-      which we strongly recommend
-      (<a href="http://issues.apache.org/jira/browse/DERBY-701#action_12360550">here is a working sample policy file</a>)</li>
+      which we strongly recommend.
+  </li>
 </ul>
 
 <p>