db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject svn commit: r766613 - in /db/derby/site/trunk: build/site/papers/DerbyTut/ns_intro.html src/documentation/content/xdocs/papers/DerbyTut/ns_intro.xml
Date Mon, 20 Apr 2009 08:30:38 GMT
Author: johnemb
Date: Mon Apr 20 08:30:37 2009
New Revision: 766613

URL: http://svn.apache.org/viewvc?rev=766613&view=rev
Log:
DERBY-4134: Remove a rebundent use of derby.jar in DERBY tutorial, and add an easier way to
start Network Server

Simplifies the Derby tutorial by taking into account that expanded 
jar file manifests and the introduction of derbyrun.jar makes it 
possible to start and stop the Network Server more easily than 
before 10.2.

Original patch contributed by Yun Lee. Minor adjustments by John H. Embretsen.

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

Modified: db/derby/site/trunk/build/site/papers/DerbyTut/ns_intro.html
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/papers/DerbyTut/ns_intro.html?rev=766613&r1=766612&r2=766613&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 Mon Apr 20 08:30:37 2009
@@ -330,6 +330,9 @@
 <li>
 <a href="#start_ns">Start Network Server</a>
 </li>
+<li>
+<a href="#ns_easier_way">An easier way: derbyrun.jar</a>
+</li>
 </ul>
 </li>
 <li>
@@ -440,11 +443,8 @@
 <ul>
      
 <li> 
-<span class="codefrag">derby.jar</span>: contains the Derby engine </li>
-     
-<li> 
 <span class="codefrag">derbynet.jar</span>: contains the code for
-   the Derby Network Server
+   the Derby Network Server and a reference to the engine jar file (derby.jar)
      </li>
 	 
 <li>
@@ -457,10 +457,10 @@
    shown below:
 </p>
 <p class="code-block">Windows:
-C:\&gt; set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;%DERBY_INSTALL%\lib\derbynet.jar;.
+C:\&gt; set CLASSPATH=%DERBY_INSTALL%\lib\derbytools.jar;%DERBY_INSTALL%\lib\derbynet.jar;.
 </p>
 <p class="code-block">UNIX:
-$ export CLASSPATH=$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbytools.jar:$DERBY_INSTALL\lib\derbynet.jar:.
+$ export CLASSPATH=$DERBY_INSTALL/lib/derbytools.jar:$DERBY_INSTALL\lib\derbynet.jar:.
 </p>
 <p>
    You can also use the script that the Derby software distribution provides 
@@ -479,7 +479,7 @@
 $ cd $DERBY_INSTALL/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
@@ -508,10 +508,30 @@
 The Network Server starts Derby, so you'll find the <span class="codefrag">derby.log</span>
 error log in the directory where you start the Network Server.
 </p>
+<a name="N100A3"></a><a name="ns_easier_way"></a>
+<h3 class="boxed">An easier way: derbyrun.jar</h3>
+<p>
+Furthermore, it is much easier to start Network Server now than before,
+due to various jar file improvements. With the latest releases, the
+entire sections "Configure environment" and "Start Network Server" could actually
+be replaced with just one command line:
+</p>
+<p class="code-block">Windows:
+C:\Apache\db-derby-10.4.1.3-bin\lib&gt; java -jar derbyrun.jar server start
+Security manager installed using the Basic server security policy.
+Apache Derby Network Server - 10.4.1.3 - (648739) started and ready to 
+	accept connections on port 1527 at 2008-04-28 17:13:13.921 GMT
+</p>
+<p class="code-block">UNIX:
+$ java -jar derbyrun.jar server start
+Security manager installed using the Basic server security policy.
+Apache Derby Network Server - 10.4.1.3 - (648739) started and ready to 
+	accept connections on port 1527 at 2008-04-30 09:35:55.871 GMT 
+</p>
 </div>
 
 
-<a name="N100AA"></a><a name="ns_sample"></a>
+<a name="N100B6"></a><a name="ns_sample"></a>
 <h2 class="boxed">Sample Application</h2>
 <div class="section">
 <p>
@@ -519,7 +539,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="N100C3"></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>
@@ -559,7 +579,7 @@
 <p class="code-block">UNIX:
 $ . setNetworkClientCP.ksh
 </p>
-<a name="N100FB"></a><a name="ij_ns_client"></a>
+<a name="N10107"></a><a name="ij_ns_client"></a>
 <h3 class="boxed">Test network server connection with ij</h3>
 <p>
    An <strong>embedded</strong> 
@@ -608,7 +628,7 @@
 </li>
    
 </ul>
-<a name="N1013D"></a><a name="copy_ns_client"></a>
+<a name="N10149"></a><a name="copy_ns_client"></a>
 <h3 class="boxed">Copy sample application</h3>
 <p>
    This section uses the same sample application that the 
@@ -621,7 +641,7 @@
    create and connect to the database using the Derby Network Client JDBC
    driver instead.
    </p>
-<a name="N10151"></a><a name="ns_lookat_code"></a>
+<a name="N1015D"></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
@@ -632,7 +652,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="N10161"></a><a name="jdbc_ns_client"></a>
+<a name="N1016D"></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,
@@ -643,7 +663,7 @@
 ...
 Class.forName(driver).newInstance();
 </p>
-<a name="N10175"></a><a name="url_ns_client"></a>
+<a name="N10181"></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,
@@ -658,7 +678,7 @@
    That connection URL, fully constructed, looks like this:
    </p>
 <p class="code-block">jdbc:derby://localhost:1527/derbyDB;create=true</p>
-<a name="N10193"></a><a name="ns_client_noshutdown"></a>
+<a name="N1019F"></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
@@ -667,13 +687,13 @@
    other applications might be accessing
    the same database you are; so, don't shut down the databases or Derby.
    </p>
-<a name="N101A4"></a><a name="compile_ns_client"></a>
+<a name="N101B0"></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="N101B2"></a><a name="run_ns_client"></a>
+<a name="N101BE"></a><a name="run_ns_client"></a>
 <h3 class="boxed">Run Sample Application</h3>
 <p>
    Run the sample application like this:
@@ -706,7 +726,7 @@
 </div>
 
 
-<a name="N101D6"></a><a name="stop_ns"></a>
+<a name="N101E2"></a><a name="stop_ns"></a>
 <h2 class="boxed">Stop Network Server</h2>
 <div class="section">
 <p>
@@ -725,15 +745,28 @@
 $ stopNetworkServer.ksh
 </p>
 <p>The window running the NetworkServer should output a
-'<span class="codefrag">Shutdown successful</span>' message.
+message confirming the shutdown.
+</p>
+<p>Note that, as with <a href="#start_ns">starting the server</a>, there
is
+also an easier way to shut down the server. For example:
+</p>
+<p class="code-block">Windows:
+C:\&gt; java -jar %DERBY_INSTALL%\lib\derbyrun.jar server shutdown
+</p>
+<p class="code-block">UNIX:
+$ java -jar $DERBY_INSTALL/lib/derbyrun.jar server shutdown
+</p>
+<p>Run derbyrun.jar without arguments for further usage information.
+derbyrun.jar has been included with Derby releases since the 10.2 release 
+series.
 </p>
 </div>
 
 
-<a name="N101F4"></a><a name="ns_next_steps"></a>
+<a name="N1020F"></a><a name="ns_next_steps"></a>
 <h2 class="boxed">Next Steps</h2>
 <div class="section">
-<a name="N101FA"></a><a name="Network+Server+Options"></a>
+<a name="N10215"></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
@@ -760,7 +793,7 @@
 <a href="http://db.apache.org/derby/manuals">Derby Server and 
 Administration Guide</a>.
 </p>
-<a name="N1021F"></a><a name="Embedded+Server"></a>
+<a name="N1023A"></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/ns_intro.xml
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/papers/DerbyTut/ns_intro.xml?rev=766613&r1=766612&r2=766613&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 Mon Apr
20 08:30:37 2009
@@ -76,9 +76,8 @@
       set your <code>CLASSPATH</code> to include the jar files listed below:</p>
   
    <ul>
-     <li> <code>derby.jar</code>: contains the Derby engine </li>
      <li> <code>derbynet.jar</code>: contains the code for
-   the Derby Network Server
+   the Derby Network Server and a reference to the engine jar file (derby.jar)
      </li>
 	 <li><code>derbytools.jar</code>: contains Derby tools
      </li>
@@ -89,11 +88,11 @@
    shown below:
 </p>
 <p class="code-block">Windows:
-C:\&gt; set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;%DERBY_INSTALL%\lib\derbynet.jar;.
+C:\&gt; set CLASSPATH=%DERBY_INSTALL%\lib\derbytools.jar;%DERBY_INSTALL%\lib\derbynet.jar;.
 </p>
 
 <p class="code-block">UNIX:
-$ export CLASSPATH=$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbytools.jar:$DERBY_INSTALL\lib\derbynet.jar:.
+$ export CLASSPATH=$DERBY_INSTALL/lib/derbytools.jar:$DERBY_INSTALL\lib\derbynet.jar:.
 </p>
 <p>
    You can also use the script that the Derby software distribution provides 
@@ -152,6 +151,29 @@
 
 </section>
 
+<section id="ns_easier_way">
+<title>An easier way: derbyrun.jar</title>
+
+<p>
+Furthermore, it is much easier to start Network Server now than before,
+due to various jar file improvements. With the latest releases, the
+entire sections "Configure environment" and "Start Network Server" could actually
+be replaced with just one command line:
+</p>
+<p class="code-block">Windows:
+C:\Apache\db-derby-10.4.1.3-bin\lib&gt; java -jar derbyrun.jar server start
+Security manager installed using the Basic server security policy.
+Apache Derby Network Server - 10.4.1.3 - (648739) started and ready to 
+	accept connections on port 1527 at 2008-04-28 17:13:13.921 GMT
+</p>
+<p class="code-block">UNIX:
+$ java -jar derbyrun.jar server start
+Security manager installed using the Basic server security policy.
+Apache Derby Network Server - 10.4.1.3 - (648739) started and ready to 
+	accept connections on port 1527 at 2008-04-30 09:35:55.871 GMT 
+</p>
+</section>
+
 </section>
 
 <section id="ns_sample">
@@ -402,7 +424,20 @@
 $ stopNetworkServer.ksh
 </p>
 <p>The window running the NetworkServer should output a
-'<code>Shutdown successful</code>' message.
+message confirming the shutdown.
+</p>
+<p>Note that, as with <a href="#start_ns">starting the server</a>, there
is
+also an easier way to shut down the server. For example:
+</p>
+<p class="code-block">Windows:
+C:\&gt; java -jar %DERBY_INSTALL%\lib\derbyrun.jar server shutdown
+</p>
+<p class="code-block">UNIX:
+$ java -jar $DERBY_INSTALL/lib/derbyrun.jar server shutdown
+</p>
+<p>Run derbyrun.jar without arguments for further usage information.
+derbyrun.jar has been included with Derby releases since the 10.2 release 
+series.
 </p>
 </section>
 



Mime
View raw message