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 ch...@apache.org on 2010/03/15 15:20:35 UTC

svn commit: r923243 - /db/derby/docs/trunk/src/devguide/cdevdvlp20458.dita

Author: chaase3
Date: Mon Mar 15 14:20:35 2010
New Revision: 923243

URL: http://svn.apache.org/viewvc?rev=923243&view=rev
Log:
DERBY-4578: Documentation: Developer's Guide topic on double-booting is mostly obsolete

Modified "Double-booting system behavior" topic.

Patch: DERBY-4578-2.diff

Modified:
    db/derby/docs/trunk/src/devguide/cdevdvlp20458.dita

Modified: db/derby/docs/trunk/src/devguide/cdevdvlp20458.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevdvlp20458.dita?rev=923243&r1=923242&r2=923243&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevdvlp20458.dita (original)
+++ db/derby/docs/trunk/src/devguide/cdevdvlp20458.dita Mon Mar 15 14:20:35 2010
@@ -20,75 +20,29 @@ limitations under the License.
 -->
 <concept id="cdevdvlp20458" xml:lang="en-us">
 <title>Double-booting system behavior</title>
-<shortdesc><ph conref="../conrefs.dita#prod/productshortname"></ph> attempts
-to prevent two instances of <ph conref="../conrefs.dita#prod/productshortname"></ph> from
-booting the same database by using a file called <i>db.lck</i> inside the
-database directory.</shortdesc>
+<shortdesc><ph conref="../conrefs.dita#prod/productshortname"></ph> prevents
+two instances of itself from booting the same database by using a file called
+<i>db.lck</i> inside the database directory.</shortdesc>
 <prolog></prolog>
 <conbody>
-<p>On all platforms running with a JDK of 1.4 or higher, <ph conref="../conrefs.dita#prod/productshortname"></ph> can
-successfully prevent a second instance of <ph conref="../conrefs.dita#prod/productshortname"></ph> from
-booting the database and thus prevents corruption.</p>
-<p>On some platforms running with a JDK lower than 1.4, <ph conref="../conrefs.dita#prod/productshortname"></ph> may
-prevent a second instance of <ph conref="../conrefs.dita#prod/productshortname"></ph> from
-booting the database (previous to JDK 1.4 the ability to do this was OS dependent).</p>
-<p>If this is the case, you will see an <i>SQLException</i> like the following:</p>
-<codeblock>ERROR XJ040: Failed to start database 'sample', see the next exception for details.
-ERROR XSDB6: Another instance of <ph conref="../conrefs.dita#prod/productshortname"></ph> might have already booted
-the databaseC:\databases\sample. 
-</codeblock>
-<p>The error is also written to the error log.</p>
-<p>If you are running a JVM prior to 1.4, <ph conref="../conrefs.dita#prod/productshortname"></ph> issues
-a warning message on some platforms if an instance of <ph conref="../conrefs.dita#prod/productshortname"></ph> attempts
-to boot a database that already has a running instance of <ph conref="../conrefs.dita#prod/productshortname"></ph> attached
-to it. However, it does not prevent the second instance from booting, and
-thus potentially corrupting, the database. (You can change this behavior with
-the property <codeph><i>derby.database.forceDatabaseLock</i></codeph>.)</p>
-<p>If a warning message has been issued, corruption might already have occurred.
-Corruption can occur even if one of the two booting systems has "readonly"
-access to the database.</p>
-<p>The warning message looks like this:</p>
+<p>If a second instance of
+<ph conref="../conrefs.dita#prod/productshortname"></ph> attempts to boot an
+already running database, the following error messages appear:</p>
 <codeblock>
-WARNING: <ph conref="../conrefs.dita#prod/productshortname"></ph> 
-(instance 80000000-00d2-3265-de92-000a0a0a0200) is
-attempting to boot the database /export/home/sky/wombat
-even though <ph conref="../conrefs.dita#prod/productshortname"></ph>
-(instance 80000000-00d2-3265-8abf-000a0a0a0200) might still be active.
-Only one instance of <ph conref="../conrefs.dita#prod/productshortname"></ph>
-should boot a database at a time. Severe and non-recoverable corruption can
-result and might have already occurred.</codeblock>
-<p>The warning is also written to the error log.</p>
-<p> If you see this warning, you should close the connection and exit the
-JVM, minimizing the risk of a corruption. Close all instances of <ph conref="../conrefs.dita#prod/productshortname"></ph>,
-then restart one instance of <ph conref="../conrefs.dita#prod/productshortname"></ph> and
-shut down the database properly so that the <i>db.lck</i> file can be removed.
-The warning message continues to appear until a proper shutdown of the <ph
-conref="../conrefs.dita#prod/productshortname"></ph> system can delete the <i>db.lck</i> file.</p>
-<p>When developing applications, you might want to configure <ph conref="../conrefs.dita#prod/productshortname"></ph> to
-append to the log. Doing so will help you detect when you have inadvertently
-started more than one instance of <ph conref="../conrefs.dita#prod/productshortname"></ph> in
-the same system. For example, when the <i>derby.infolog.append</i> property
-is set to true for a system, booting two instances of <ph conref="../conrefs.dita#prod/productshortname"></ph> in
-the same system produces the following in the log:</p>
-<codeblock>Sat Aug 14 09:42:51 PDT 2005:
-Booting <ph conref="../conrefs.dita#prod/productshortname"></ph> version <ph
-conref="../conrefs.dita#prod/productlongname"></ph> - 10.0.0.1 - (29612): 
-
-instance 80000000-00d2-1c87-7586-000a0a0b1300 on database at
-directory C:\tutorial_system\sample
-------------------------------------------------------------
-Sat Aug 14 09:42:59 PDT 2005:
-Booting <ph conref="../conrefs.dita#prod/productshortname"></ph> version <ph
-conref="../conrefs.dita#prod/productlongname"></ph> - 10.0.0.1 - (29612):
-instance 80000000-00d2-1c87-9143-000a0a0b1300 on database at
-directory C:\tutorial_system\HelloWorldDB</codeblock>
-<p><ph conref="../conrefs.dita#prod/productshortname"></ph> allows you to
-boot databases that are not in the system directory. While this might seem
-more convenient, check that you do not boot the same database with two JVMs.
-If you need to access a single database from more than one JVM, you will need
-to put a server solution in place. You can allow multiple JVMs that need to
-access that database to connect to the server. The <ph conref="../conrefs.dita#prod/productshortname"></ph> Network
-Server is provided as a server solution. See the <cite><ph conref="../conrefs.dita#pub/citadmin"></ph></cite> for
-more information on the Network Server.</p>
+ERROR XJ040: Failed to start database 'firstdb', see the next exception
+for details.
+ERROR XSDB6: Another instance of Derby may have already booted the
+database /home/myself/DERBYTUTOR/firstdb.
+</codeblock>
+<p>In addition, a stack trace appears in the <i>derby.log</i> file.</p>
+<p>If you need to access a single database from more than one
+Java Virtual Machine (JVM), you will need to put a server solution in place. You
+can allow applications from multiple JVMs that need to access that database to
+connect to the server. The
+<ph conref="../conrefs.dita#prod/productshortname"></ph> Network Server is
+provided as a server solution. For basic information on starting and using the
+Network Server, see <ph conref="../conrefs.dita#pub/citgetstart"></ph>. See the
+<ph conref="../conrefs.dita#pub/citadmin"></ph> for more information on the
+Network Server.</p>
 </conbody>
 </concept>