You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@db.apache.org by rh...@apache.org on 2012/12/19 19:20:28 UTC

svn commit: r843115 [20/44] - in /websites/production/db/content/derby: ./ binaries/ blogs/ blogs/images/ dev/ docs/ images/ integrate/ integrate/plugin_help/ integrate/plugin_help/images/ logo/ manuals/ papers/ papers/DerbyTut/ releases/ skin/ skin/cs...

Added: websites/production/db/content/derby/papers/ApacheCon.html
==============================================================================
--- websites/production/db/content/derby/papers/ApacheCon.html (added)
+++ websites/production/db/content/derby/papers/ApacheCon.html Wed Dec 19 18:20:21 2012
@@ -0,0 +1,621 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.8">
+<meta name="Forrest-skin-name" content="pelt">
+<title>ApacheCon</title>
+<link type="text/css" href="../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../skin/profile.css" rel="stylesheet">
+<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://db.apache.org/">db</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://db.apache.org/derby"><img class="logoImage" alt="Apache Derby" src="../images/derby-logo-web.png" title="Derby is a zero-admin Java RDBMS"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogoA1">
+<a href="http://db.apache.org"><img class="logoImage" alt="Apache DB Project" src="../images/db-logo-white.png" title="Apache DB creates and maintains database solutions."></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="../index.html">Home</a>
+</li>
+<li>
+<a class="unselected" href="../quick_start.html">Quick Start</a>
+</li>
+<li>
+<a class="unselected" href="../derby_downloads.html">Download</a>
+</li>
+<li>
+<a class="unselected" href="../derby_comm.html">Community</a>
+</li>
+<li>
+<a class="unselected" href="../manuals/index.html">Documentation</a>
+</li>
+<li class="current">
+<a class="selected" href="../blogs/index.html">Resources</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_1.1', '../skin/')" id="menu_1.1Title" class="menutitle">Blogs and Articles About Derby</div>
+<div id="menu_1.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#blogs">Blogs</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3', '../skin/')" id="menu_1.1.3Title" class="menutitle">Articles</div>
+<div id="menu_1.1.3" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.1.3.1', '../skin/')" id="menu_1.1.3.1Title" class="menutitle">Tutorials, Tips and Tuning</div>
+<div id="menu_1.1.3.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html#getstarted">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#features">Features, Hints and Tips</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#security">Security</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#performance">Performance and Tuning</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3.2', '../skin/')" id="menu_1.1.3.2Title" class="menutitle">Tools and Migration</div>
+<div id="menu_1.1.3.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html#tools">Tools</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#migration">Migration</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3.3', '../skin/')" id="menu_1.1.3.3Title" class="menutitle">Applications</div>
+<div id="menu_1.1.3.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html#client">Client</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#middletier">Middle Tier</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#persistence">Persistence</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#scalability">Scalability and Failover</a>
+</div>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', '../skin/')" id="menu_1.2Title" class="menutitle">Integration With Other Products</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/index.html#uses">What works with Derby?</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/index.html#products">Product Writeups</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.3', '../skin/')" id="menu_1.3Title" class="menutitle">Eclipse Plug-ins</div>
+<div id="menu_1.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/derby_plugin_info.html">Info</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.4', '../skin/')" id="menu_selected_1.4Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Papers and Presentations</div>
+<div id="menu_selected_1.4" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../papers/index.html">Overview</a>
+</div>
+<div onclick="SwitchMenu('menu_1.4.2', '../skin/')" id="menu_1.4.2Title" class="menutitle">Derby Engine</div>
+<div id="menu_1.4.2" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.4.2.1', '../skin/')" id="menu_1.4.2.1Title" class="menutitle">Javadoc</div>
+<div id="menu_1.4.2.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/engine">Engine</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/language">Language</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/tools">Tools</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/publishedapi">API</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../papers/derby_arch.html">Architecture</a>
+</div>
+<div class="menuitem">
+<a href="../papers/btree_package.html">BTree</a>
+</div>
+<div class="menuitem">
+<a href="../papers/pageformats.html">Disk Page Format</a>
+</div>
+<div class="menuitem">
+<a href="../papers/derby_htw.html">How Things Work</a>
+</div>
+<div class="menuitem">
+<a href="../papers/Intersect-design.html">Intersect &amp; Except</a>
+</div>
+<div class="menuitem">
+<a href="../papers/JDBCImplementation.html">JDBC</a>
+</div>
+<div class="menuitem">
+<a href="../papers/logformats.html">Log Format</a>
+</div>
+<div class="menuitem">
+<a href="../papers/recovery.html">Logging &amp; Recovery</a>
+</div>
+<div class="menuitem">
+<a href="../papers/optimizer.html">Optimizer</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/engine/org/apache/derby/iapi/types/package-summary.html#package_description">Type System</a>
+</div>
+<div class="menuitem">
+<a href="../papers/versionupgrade.html">Versioning</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4.3', '../skin/')" id="menu_1.4.3Title" class="menutitle">Derby Network Client</div>
+<div id="menu_1.4.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/DerbyClientSpec.html">Functional Spec</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4.4', '../skin/')" id="menu_1.4.4Title" class="menutitle">Derby Tutorial</div>
+<div id="menu_1.4.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/DerbyTut/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/install_software.html">Step 1: Install Software</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/ij_intro.html">Step 2: ij Basics</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/embedded_intro.html">Step 3: Embedded Derby</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/ns_intro.html">Step 4: Derby Network Server</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.4.5', '../skin/')" id="menu_selected_1.4.5Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Presentations</div>
+<div id="menu_selected_1.4.5" class="selectedmenuitemgroup" style="display: block;">
+<div class="menupage">
+<div class="menupagetitle">ApacheCon</div>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#Victorian+Java+User+Group">Victorian JUG 2008</a>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#OSCON+2005">OSCON 2005</a>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#Colorado+Software+Summit+2004">Colorado 2004</a>
+</div>
+</div>
+</div>
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<hr>
+<form action="http://www.google.com/search" method="get">
+<input value="db.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="18" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                  <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div class="trail">Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>ApacheCon</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#ApacheCon+US%3A+November+12-16%2C+2007">ApacheCon US: November 12-16, 2007</a>
+</li>
+<li>
+<a href="#ApacheCon+EU%3A+May+1-4%2C+2007">ApacheCon EU: May 1-4, 2007</a>
+</li>
+<li>
+<a href="#ApacheCon+US%3A+October+9-13%2C+2006">ApacheCon US: October 9-13, 2006</a>
+</li>
+<li>
+<a href="#ApacheCon+US%3A+December+10-14%2C+2005">ApacheCon US: December 10-14, 2005</a>
+</li>
+<li>
+<a href="#ApacheCon+US%3A+November+13-17%2C+2004">ApacheCon US: November 13-17, 2004</a>
+<ul class="minitoc">
+<li>
+<a href="#Derby+Code+Contest">Derby Code Contest</a>
+<ul class="minitoc">
+<li>
+<a href="#First+Place">First Place</a>
+</li>
+<li>
+<a href="#Second+Place">Second Place</a>
+</li>
+<li>
+<a href="#Third+Place">Third Place</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+
+
+<a name="N1000D"></a><a name="ApacheCon+US%3A+November+12-16%2C+2007"></a>
+<h2 class="boxed">ApacheCon US: November 12-16, 2007</h2>
+<div class="section">
+<p>
+    
+<a class="external" href="http://www.us.apachecon.com/us2007">ApacheCon US 2007</a> was held
+    in Atlanta, Georgia on November 12-16.
+  </p>
+<p>
+    Sessions that focused on Apache Derby included:
+  </p>
+<ul>
+  
+<li> 
+<em>Saucer Separation</em>
+  [<a class="external" href="http://people.apache.org/~rhillegas/vtiDemo/doc/saucerSeparation.html">HTML</a>]
+  </li>
+  
+<li> 
+<em>Real-Time RIA's with Apache Derby and Grizzly Comet</em>
+  [<a class="external" href="http://mediacast.sun.com/share/forsini/20071114_RIA_Comet_Derby_04.pdf">PDF</a>]
+  </li>
+  
+</ul>
+</div>
+
+
+<a name="N10035"></a><a name="ApacheCon+EU%3A+May+1-4%2C+2007"></a>
+<h2 class="boxed">ApacheCon EU: May 1-4, 2007</h2>
+<div class="section">
+<p>
+    
+<a class="external" href="http://www.apachecon.com/2007/EU">ApacheCon EU 2007</a> was held
+    in Amsterdam on May 1-4, 2007.
+  </p>
+<p>
+    Sessions that focused on Apache Derby included:
+  </p>
+<ul>
+    
+<li> 
+<em>Configuring Apache Derby for Performance and Durability</em>
+      [<a class="external" href="http://home.online.no/~olmsan/publications/pres/apachecon07eu/DerbyApacheCon07eu.pdf">PDF</a>]
+    </li>
+  
+</ul>
+</div>
+
+
+<a name="N10053"></a><a name="ApacheCon+US%3A+October+9-13%2C+2006"></a>
+<h2 class="boxed">ApacheCon US: October 9-13, 2006</h2>
+<div class="section">
+<p>
+
+<a class="external" href="http://www.apachecon.com/2006/US">ApacheCon US 2006</a> was held
+in Austin, Texas, on October 9-13, 2006. 
+</p>
+<p>
+Sessions that focused on Apache Derby included:
+</p>
+<ul>
+ 
+<li> 
+<em>Java in the Database</em> [<a href="../binaries/JavaInTheDatabase-2006.pdf">PDF</a>]
+ </li>
+ 
+<li> 
+<em>Apache Derby 10.2 -- New feature overview</em> [<a href="../binaries/Apache_Derby10_2_Whats_New-2006.ppt">PPT</a>]
+ </li>
+ 
+<li> 
+<em>Open Source: The End of Ossification (or, Why I Love My Job)</em> [<a href="../binaries/RHansenApacheCon-2006.pdf">PDF</a>]
+ </li>
+ 
+<li> 
+<em>Configuring Apache Derby for Performance and Durability</em> [<a href="../binaries/DerbyPerfDurability-2006.pdf">PDF</a>]
+ </li>
+
+</ul>
+</div>
+
+
+<a name="N1008F"></a><a name="ApacheCon+US%3A+December+10-14%2C+2005"></a>
+<h2 class="boxed">ApacheCon US: December 10-14, 2005</h2>
+<div class="section">
+<p>
+
+<a class="external" href="http://www.apachecon.com/2005/US">ApacheCon US 2005</a> was held
+in San Diego, California, on December 10-14, 2005. 
+</p>
+<p>
+Sessions that focused on Apache Derby included:
+</p>
+<ul>
+  
+<li>
+<em>Building Highly Available Applications with Geronimo and Derby</em>
+      [<a class="external" href="http://sequoia.continuent.org/Resources">Download</a>]</li>
+  
+<li>
+<em>Performance Analysis of Apache Derby</em>
+      [<a class="external" href="http://wiki.apache.org/apachecon/Us2005OnlineSessionSlides">PDF</a>]</li>
+  
+<li>
+<em>Apache Derby Security</em> [<a href="../binaries/jta-WE15.pdf">PDF</a>]</li>
+
+</ul>
+</div>
+
+
+<a name="N100BE"></a><a name="ApacheCon+US%3A+November+13-17%2C+2004"></a>
+<h2 class="boxed">ApacheCon US: November 13-17, 2004</h2>
+<div class="section">
+<p>
+
+<a class="external" href="http://www.apachecon.com/2004/US">ApacheCon US 2004</a> was held
+in Las Vegas on November 13-17 2004. 
+</p>
+<p>
+Sessions that focused on Apache Derby included:
+</p>
+<ul>
+
+   
+<li> 
+<p>
+        
+<em>Apache Derby: Embed This!</em> used the
+	<a href="fortune_tut.html">Apache Derby Fortune Server Tutorial</a>
+        to show how to embed Derby in other Apache technologies -- and 
+        other Apache technologies into Derby.
+	</p>
+   
+</li>
+
+   
+<li> 
+<p>
+<em>Introducing Apache Derby</em>
+        introduces Derby capabilities and architecture
+	[<a href="../binaries/djd_derby_intro.pdf">PDF</a>].
+	</p>
+   
+</li>
+
+   
+<li> 
+<p>
+<em>Perform with Apache Derby</em>
+        highlights performance tuning issues and provides tips and tricks that
+        avoid common pitfalls
+	[<a href="../binaries/reuben_derby_perf.pdf">PDF</a>].
+	</p>
+   
+</li>
+
+   
+<li> 
+<p>
+<em>Securing Data with Apache Derby</em>
+          focuses on Derby security features
+	[<a href="../binaries/djd_derby_security.pdf">PDF</a>].
+	</p>
+   
+</li>
+
+
+</ul>
+<a name="N10102"></a><a name="Derby+Code+Contest"></a>
+<h3 class="boxed">Derby Code Contest</h3>
+<p>
+  An on-site Derby code contest tooks place at ApacheCon with the
+  following rules:
+  </p>
+<ul>
+     
+<li> Must use Derby's functionality and capability</li>
+     
+<li> Must integrate Derby with one or more other Apache projects</li>
+     
+<li> Innovative solution</li>
+     
+<li> Result can be a tool, mini-application, or any other demonstration of Derby integration</li>
+  
+</ul>
+<a name="N1011A"></a><a name="First+Place"></a>
+<h4>First Place</h4>
+<p>
+  The first place winner was 
+  <a class="external" href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a>.
+  </p>
+<p>
+  Emmanuel's entry integrates Derby,  Jakarta Tomcat, and Jakarta Velocity.
+  </p>
+<p>
+  He ported the servlet version of xPetstore
+  (
+  <a class="external" href="http://xpetstore.sourceforge.net/">http://xpetstore.sourceforge.net/</a>) 
+  to Tomcat 5 and Derby. It uses a
+  generic Hibernate mapper and the DB2 Universal JDBC Driver to remotely
+  access Derby. For reliability, it starts up and accesses a cluster of
+  Derby databases (fully mirrored) using the C-JDBC clustering software
+  (<a class="external" href="http://c-jdbc.objectweb.org">http://c-jdbc.objectweb.org</a>).
+  </p>
+<p>
+  Incidentally, after demoing his application to the judges, Emmanuel
+  hooked C-JDBC up to Derby using the Derby embedded driver -- and it does
+  look like C-JDBC provides an open source alternative to the DB2
+  Universal JDBC Driver. Please try it out and post your experience to the
+  Derby mail lists.
+  </p>
+<a name="N10139"></a><a name="Second+Place"></a>
+<h4>Second Place</h4>
+<p>
+  The second place winner was 
+  <a class="external" href="mailto:hps@intermeta.de>">Henning P. Schmiedehausen</a>.
+  </p>
+<p>
+  Henning's entry integrates Derby with  Jakarta Turbine,  Jakarta Tomcat,
+  and  DB Torque.
+  </p>
+<p>
+  His application matches names with faces ("Apache Faces"), which allows
+  users to upload a small image, name, and email address. So, the next
+  time you attend ApacheCon, you won't walk right by people you may have
+  been interacting with in email during the last year(s).
+  </p>
+<a name="N1014D"></a><a name="Third+Place"></a>
+<h4>Third Place</h4>
+<p>
+  The third place winner was 
+  <a class="external" href="mailto:tcurdt@apache.org">Torsten Curdt</a>.
+  </p>
+<p>
+  Torsten's entry integrates Derby with Cocoon.
+  </p>
+<p>
+  His wiki page at 
+  <a class="external" href="http://wiki.apache.org/cocoon/Derby">http://wiki.apache.org/cocoon/Derby</a>
+  describes how to
+  get Derby running from within Cocoon. Here's a verbatim note from
+  Torsten's abstract: "A (very) small patch makes the ESQL component use
+  the right "driver" automagically. A XSP example page shows that even
+  scrollable resultsets are working with Derby. ...which is important in
+  the web area."
+  </p>
+</div>
+
+
+<p>
+
+<em>Last updated: November 22, 2007</em>
+
+</p>
+
+
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2004-2012 Apache Software Foundation</div>
+<div id="feedback">
+    Send feedback about the website to:
+  <a id="feedbackto" href="mailto:derby-user@db.apache.org?subject=Feedback%C2%A0papers/ApacheCon.html">derby-user@db.apache.org</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Added: websites/production/db/content/derby/papers/DerbyClientSpec.html
==============================================================================
--- websites/production/db/content/derby/papers/DerbyClientSpec.html (added)
+++ websites/production/db/content/derby/papers/DerbyClientSpec.html Wed Dec 19 18:20:21 2012
@@ -0,0 +1,1215 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.8">
+<meta name="Forrest-skin-name" content="pelt">
+<meta name="generator" content="">
+<meta name="" content="">
+<meta name="GENERATOR" content="">
+<title>Derby Network Client</title>
+<link type="text/css" href="../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../skin/profile.css" rel="stylesheet">
+<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://db.apache.org/">db</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://db.apache.org/derby"><img class="logoImage" alt="Apache Derby" src="../images/derby-logo-web.png" title="Derby is a zero-admin Java RDBMS"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogoA1">
+<a href="http://db.apache.org"><img class="logoImage" alt="Apache DB Project" src="../images/db-logo-white.png" title="Apache DB creates and maintains database solutions."></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="../index.html">Home</a>
+</li>
+<li>
+<a class="unselected" href="../quick_start.html">Quick Start</a>
+</li>
+<li>
+<a class="unselected" href="../derby_downloads.html">Download</a>
+</li>
+<li>
+<a class="unselected" href="../derby_comm.html">Community</a>
+</li>
+<li>
+<a class="unselected" href="../manuals/index.html">Documentation</a>
+</li>
+<li class="current">
+<a class="selected" href="../blogs/index.html">Resources</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_1.1', '../skin/')" id="menu_1.1Title" class="menutitle">Blogs and Articles About Derby</div>
+<div id="menu_1.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#blogs">Blogs</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3', '../skin/')" id="menu_1.1.3Title" class="menutitle">Articles</div>
+<div id="menu_1.1.3" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.1.3.1', '../skin/')" id="menu_1.1.3.1Title" class="menutitle">Tutorials, Tips and Tuning</div>
+<div id="menu_1.1.3.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html#getstarted">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#features">Features, Hints and Tips</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#security">Security</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#performance">Performance and Tuning</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3.2', '../skin/')" id="menu_1.1.3.2Title" class="menutitle">Tools and Migration</div>
+<div id="menu_1.1.3.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html#tools">Tools</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#migration">Migration</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3.3', '../skin/')" id="menu_1.1.3.3Title" class="menutitle">Applications</div>
+<div id="menu_1.1.3.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../blogs/index.html#client">Client</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#middletier">Middle Tier</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#persistence">Persistence</a>
+</div>
+<div class="menuitem">
+<a href="../blogs/index.html#scalability">Scalability and Failover</a>
+</div>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', '../skin/')" id="menu_1.2Title" class="menutitle">Integration With Other Products</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/index.html#uses">What works with Derby?</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/index.html#products">Product Writeups</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.3', '../skin/')" id="menu_1.3Title" class="menutitle">Eclipse Plug-ins</div>
+<div id="menu_1.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/derby_plugin_info.html">Info</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.4', '../skin/')" id="menu_selected_1.4Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Papers and Presentations</div>
+<div id="menu_selected_1.4" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../papers/index.html">Overview</a>
+</div>
+<div onclick="SwitchMenu('menu_1.4.2', '../skin/')" id="menu_1.4.2Title" class="menutitle">Derby Engine</div>
+<div id="menu_1.4.2" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.4.2.1', '../skin/')" id="menu_1.4.2.1Title" class="menutitle">Javadoc</div>
+<div id="menu_1.4.2.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/engine">Engine</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/language">Language</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/tools">Tools</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/publishedapi">API</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../papers/derby_arch.html">Architecture</a>
+</div>
+<div class="menuitem">
+<a href="../papers/btree_package.html">BTree</a>
+</div>
+<div class="menuitem">
+<a href="../papers/pageformats.html">Disk Page Format</a>
+</div>
+<div class="menuitem">
+<a href="../papers/derby_htw.html">How Things Work</a>
+</div>
+<div class="menuitem">
+<a href="../papers/Intersect-design.html">Intersect &amp; Except</a>
+</div>
+<div class="menuitem">
+<a href="../papers/JDBCImplementation.html">JDBC</a>
+</div>
+<div class="menuitem">
+<a href="../papers/logformats.html">Log Format</a>
+</div>
+<div class="menuitem">
+<a href="../papers/recovery.html">Logging &amp; Recovery</a>
+</div>
+<div class="menuitem">
+<a href="../papers/optimizer.html">Optimizer</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/engine/org/apache/derby/iapi/types/package-summary.html#package_description">Type System</a>
+</div>
+<div class="menuitem">
+<a href="../papers/versionupgrade.html">Versioning</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.4.3', '../skin/')" id="menu_selected_1.4.3Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Derby Network Client</div>
+<div id="menu_selected_1.4.3" class="selectedmenuitemgroup" style="display: block;">
+<div class="menupage">
+<div class="menupagetitle">Functional Spec</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4.4', '../skin/')" id="menu_1.4.4Title" class="menutitle">Derby Tutorial</div>
+<div id="menu_1.4.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/DerbyTut/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/install_software.html">Step 1: Install Software</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/ij_intro.html">Step 2: ij Basics</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/embedded_intro.html">Step 3: Embedded Derby</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/ns_intro.html">Step 4: Derby Network Server</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4.5', '../skin/')" id="menu_1.4.5Title" class="menutitle">Presentations</div>
+<div id="menu_1.4.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/ApacheCon.html">ApacheCon</a>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#Victorian+Java+User+Group">Victorian JUG 2008</a>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#OSCON+2005">OSCON 2005</a>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#Colorado+Software+Summit+2004">Colorado 2004</a>
+</div>
+</div>
+</div>
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<hr>
+<form action="http://www.google.com/search" method="get">
+<input value="db.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="18" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                  <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div class="trail">Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>Derby Network Client</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Derby+Network+Client">Derby Network Client</a>
+<ul class="minitoc">
+<li>
+<a href="#">Overview</a>
+</li>
+<li>
+<a href="#-N1003A">Functionality</a>
+</li>
+<li>
+<a href="#-N1004B">JDBC Driver and DataSource names</a>
+<ul class="minitoc">
+<li>
+<a href="#Connection+URL+Format">Connection URL Format</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#Ways+to+Connect+using+the+Derby+Client+Driver">Ways to Connect using the Derby Client Driver</a>
+<ul class="minitoc">
+<li>
+<a href="#Client+CLASSPATH">Client CLASSPATH</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#-N100B5">Data Source properties</a>
+<ul class="minitoc">
+<li>
+<a href="#-N101AD">Tracing</a>
+</li>
+<li>
+<a href="#ClientDataSource+Tracing">ClientDataSource Tracing</a>
+</li>
+<li>
+<a href="#DriverManager+Tracing">DriverManager Tracing</a>
+</li>
+<li>
+<a href="#-N101EC">ClientDataSource Tracing Examples</a>
+</li>
+<li>
+<a href="#-N10230">DriverManager Tracing Examples</a>
+</li>
+<li>
+<a href="#-N10249">Changing the Default Trace Level</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#-N102B1">Security</a>
+</li>
+<li>
+<a href="#-N10306">Packaging, Distribution and Versioning</a>
+</li>
+<li>
+<a href="#-N10314">Comparision and/or differences with the Derby Embedded Driver</a>
+</li>
+<li>
+<a href="#-N10334">Effects to existing documentation</a>
+</li>
+<li>
+<a href="#-N103A9">Miscellaneous</a>
+<ul class="minitoc">
+<li>
+<a href="#Tools">Tools</a>
+</li>
+<li>
+<a href="#Testing">Testing</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<a name="N10025"></a><a name="Derby+Network+Client"></a>
+<h2 class="boxed">Derby Network Client</h2>
+<div class="section">
+<hr>
+<p>Created: 4/11/05<br>Last update: 10/25/05 -- changed h4 tags to h3 (forrest hid data), and removed manual table of contents</p>
+<hr>
+<a name="N1002F"></a>
+<h3 class="boxed">Overview</h3>
+<p>The Derby network client provides network connectivity to the Derby Network Server. It is distributed as an additional jar file, derbyclient.jar, with an entirely independent code base from the embedded driver.</p>
+<p>The Derby network client is a type 4, JDBC compliant Driver, which attempts to match the Derby Embedded JDBC driver as much as possible. Initially, it will have some differences from the embedded driver, for example, some SQL States will remain null and error messages will not be localized in the initial offering. Hopefully, over time the functionality of the two drivers will converge.</p>
+<hr>
+<a name="N1003A"></a><a name="-N1003A"></a>
+<h3 class="boxed">Functionality</h3>
+<br>
+<br>
+<p>All functionality for the Derby network client is packaged in the derbyclient.jar file which will be added to the Derby distribution. The client application needs only to include the new jar and application classes in its classpath. derbyclient.jar has no dependencies on the tools, server, or derby database engine classes, nor do those classes depend on derbyclient.jar. Some new client classes are in the same package as the embedded driver, such as org.apache.derby.jdbc.ClientDriver, but the actual classes are contained only in the client jar file.</p>
+<p>The Derby network client allows connections via JDBC URL using DriverManager by its implementations of JDBC20 data sources, javax.sql.DataSource, javax.sql.ConnectionPoolDataSource. An implementation of javax.sql.XADataSource is also provided for network XA Support. The Derby network client provides a tracing facility to collect JDBC trace information and view protocol flows for debugging. Security mechanisms are also provided for user and password encryption. DataSource properties and connection attributes can be used to enable tracing, as well as security settings.</p>
+<p>Tools support for ij and dblook as well as test harness support is provided.</p>
+<p>The sections that follow will describe the functionality and provide examples of using each characteristic mentioned here.</p>
+<hr>
+<a name="N1004B"></a><a name="-N1004B"></a>
+<h3 class="boxed">JDBC Driver and DataSource names</h3>
+<p>The Derby network client classes and JDBC interfaces they implement are listed below.</p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+<tbody>
+<tr>
+<th>JDBC Interface</th><th>&nbsp;</th><th>Derby network client class</th>
+</tr>
+<tr>
+<td>java.sql.Driver</td><td>&nbsp;</td><td>org.apache.derby.jdbc.ClientDriver</td>
+</tr>
+<tr>
+<td>javax.sql.DataSource</td><td>&nbsp;</td><td>org.apache.derby.jdbc.ClientDataSource</td>
+</tr>
+<tr>
+<td>javax.sql.XADataSource</td><td>&nbsp;</td><td>org.apache.derby.jdbc.ClientXADataSource</td>
+</tr>
+<tr>
+<td>javax.sql.ConnectionPoolDataSource</td><td>&nbsp;</td><td>org.apache.derby.jdbc.ClientConnectionPoolDataSource</td>
+</tr>
+</tbody>
+</table>
+<a name="N10078"></a><a name="Connection+URL+Format"></a>
+<h4>Connection URL Format</h4>
+<p>The protocol for the client URL is jdbc:derby://. The embedded and client attributes are specified the same way. The embedded driver has been changed to reject URL's with a // following derby:</p>
+<p>
+<strong>Derby network client URL Format</strong>
+</p>
+<p>jdbc:derby://server[:port]/databaseName[;attributeKey=value]..</p>
+<p>An example of using this URL to connect to the Derby network server running on the localhost at port 1527 in ij is:</p>
+<p>ij&gt; connect `jdbc:derby://localhost:1527/sample;create=true;user=user1;password=secret4me';</p>
+<hr>
+<a name="N10088"></a><a name="Ways+to+Connect+using+the+Derby+Client+Driver"></a>
+<h3 class="boxed">Ways to Connect using the Derby Client Driver</h3>
+<a name="N1008C"></a><a name="Client+CLASSPATH"></a>
+<h4>Client CLASSPATH</h4>
+<p>Prior to using the Derby network client, the derbyclient.jar file needs to be added to the classpath on the client. On Windows, to add the derbyclient.jar file to your classpath, use the following command:</p>
+<p>set CLASSPATH=%CLASSPATH%;%DERBY_INSTALL%\lib\derbyclient.jar;</p>
+<p>When using the Derby client driver to connect to the Derby database, there are two general methodologies used to connect. The first method is to use the DriverManager. The second way to connect is to use one of the three DataSource classes listed above.</p>
+<p>To use the DriverManager, the first step is to load the ClientDriver.</p>
+<p>
+<strong>Loading the driver:</strong>
+</p>
+<pre></pre>
+<pre class="code">port java.sql.* ; ... try { Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch(java.lang.InstantiationException instant) { instant.printStackTrace(); } catch(java.lang.IllegalAccessException illegal) { illegal.printStackTrace(); } ...</pre>
+<pre>
+<br>Now a connection can be made with the DriverManager. 
+<br>
+<strong>Connecting with the DriverManager:</strong> 
+
+</pre>
+<pre class="code">String url = "jdbc:derby://myhost.mydomain.com:1527/mydb;create=true;user=user1;password=secret4me"; connection = DriverManager.getConnection(url);</pre>
+<pre>
+<br>
+<strong>Connecting with the ClientDataSource:</strong> 
+</pre>
+<pre></pre>
+<pre class="code">import java.sql.*; import javax.sql.*; import org.apache.derby.jdbc.ClientDataSource; ... ClientDataSource ds=new ClientDataSource(); ds.setDatabaseName("sample"); ds.setServerName("localhost"); // host with listening network server. ds.setPortNumber(1527); // port of listening network server. ds.setUser("user1"); // Assign the user ID ds.setPassword("secret4me"); // Assign the password Connection con= ds.getConnection(); // Create a Connection object</pre>
+<pre> 
+
+
+</pre>
+<pre></pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N100B5"></a><a name="-N100B5"></a>
+<h3 class="boxed">Data Source properties</h3>
+<pre>
+<br>The following data source properties are available on the ClientDataSource, 
+ClientConnectionPoolDataSource and the ClientXADataSource classes. 
+
+</pre>
+<pre class="code"></pre>
+<pre></pre>
+<table class="ForrestTable" cellspacing="1" cellpadding="3" border="1">
+<tbody>
+<tr>
+<th colspan="6">Standard JDBC Data Source Properties</th>
+</tr>
+<tr>
+<th>Property</th><th>Type</th><th>Description</th><th>Default</th><th>Req'd</th><th>Url Attr</th>
+</tr>
+<tr>
+<td><strong>databaseName*</strong></td><td>String</td><td>name of database</td><td>&nbsp;</td><td>X</td><td>&nbsp;</td>
+</tr>
+<tr>
+<td><strong>dataSourceName*</strong></td><td>String</td><td>a data source name</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
+</tr>
+<tr>
+<td><strong>description*</strong></td><td>String</td><td>a description of this data source</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
+</tr>
+<tr>
+<td><strong>user*</strong></td><td>String</td><td>user's account name</td><td>APP</td><td>&nbsp;</td><td>user</td>
+</tr>
+<tr>
+<td><strong>password*</strong></td><td>String</td><td>user's database password</td><td>&nbsp;</td><td>&nbsp;</td><td>password</td>
+</tr>
+<tr>
+<td><strong>serverName</strong></td><td>String</td><td>host name or TCP/IP address where the server is listening for requests</td><td>localhost</td><td>&nbsp;</td><td>&nbsp;</td>
+</tr>
+<tr>
+<td><strong>portNumber</strong></td><td>int</td><td>port number where the server is listening for requests</td><td>1527</td><td>&nbsp;</td><td>&nbsp;</td>
+</tr>
+<tr>
+<th colspan="6">Client Specific Data Source Properties</th>
+</tr>
+<tr>
+<td><strong>traceFile</strong></td><td>String</td><td>filename for tracing output. Setting this property turns on tracing. (See Tracing)</td><td>&nbsp;</td><td>&nbsp;</td><td>traceFile</td>
+</tr>
+<tr>
+<td><strong>traceDirectory</strong></td><td>String</td><td>directory for tracing output. Each connection will output to a separate file. Setting this property turns on tracing. (See Tracing)</td><td>&nbsp;</td><td>&nbsp;</td><td>traceDirectory</td>
+</tr>
+<tr>
+<td><strong>traceLevel</strong></td><td>int</td><td>level of client tracing if traceFile or traceDirectory are set</td><td>TRACE_ALL</td><td>&nbsp;</td><td>traceLevel</td>
+</tr>
+<tr>
+<td><strong>traceFileAppend</strong></td><td>boolean</td><td>true if tracing output should append to the existing trace file.</td><td>false</td><td>&nbsp;</td><td>traceFileAppend</td>
+</tr>
+<tr>
+<td><strong>securityMechanism</strong></td><td>int</td><td>security mechanism (See Security)</td><td>USER_ONLY_SECURITY</td><td>&nbsp;</td><td>securityMechanism</td>
+</tr>
+<tr>
+<td><strong>retrieveMessageText</strong></td><td>boolean</td><td>retrieve message text from server. A stored procedure is called to retrieve the message text with each SQLException and may start a new unit of work. Set to false if you do not want the performance impact or encounter issues with a new unit of work being started.</td><td>true</td><td>&nbsp;</td><td>retrieveMessageText</td>
+</tr>
+<tr>
+<th colspan="6">Server Specific Data Source Properties</th>
+</tr>
+<tr>
+<td colspan="6">These properties are translated into server specific URL attributes which are passed to the Derby embedded driver by appending them to the databaseName. For example, calling setDatabaseName("mydb") followed by setConnectionAttributes("create=true") will cause the string mydb;create=true to be sent to the server as the database name . The URL to connect to the database will therefore include these attributes.</td>
+</tr>
+<tr>
+<td><strong>connectionAttributes*</strong></td><td>String</td><td>set to the list of Derby embedded connection attributes separated by semi-colons. E.g., to specify an encryption bootPassword of "x8hhk2adf", and set upgrade to true, do the following: ds.setConnectionAttributes("bootPassword=x8hhk2adf;upgrade=true");</td><td>&nbsp;</td><td>&nbsp;</td><td>various. See Derby Documentation for a full list.</td>
+</tr>
+</tbody>
+</table>
+<pre> 
+<br>* This property is also available on the EmbeddedDataSource. All other data 
+  source properties are supplemental to the ClientDataSources. 
+ <br>Note: setAttributesAsPassword , which is available for the embedded data 
+  sources is not available for the client data source. It is not clear how to 
+  communicate it to the server. 
+</pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N101AD"></a><a name="-N101AD"></a>
+<h4>Tracing</h4>
+<pre>
+<br>The Derby network client provides a tracing facility to collect JDBC trace 
+information and view protocol flows. Listed below are various ways to obtain 
+trace output. However, the easiest way to turn on tracing is to use the 
+traceFile attribute on the url in ij. The example below shows all tracing going 
+to the file trace.out from an ij session. 
+</pre>
+<pre class="code">ij&gt;connect 'jdbc:derby://localhost:1527/mydb;create=true;traceFile=trace.out;user=user1;password=secret4me';</pre>
+<pre> 
+
+</pre>
+<a name="N101BB"></a><a name="ClientDataSource+Tracing"></a>
+<h4>ClientDataSource Tracing</h4>
+<pre>
+<br>Three methods can be used to collect tracing data if obtaining connections 
+from the ClientDataSource. 
+</pre>
+<ol>
+<li>Use the <em>setLogWriter(java.io.PrintWriter)</em> method of ClientDataSource and set the PrintWriter to a non null value.</li>
+<li>Use the <em>setTraceFile(String filename)</em> method of ClientDataSource.</li>
+<li>Use the <em>setTraceDirectory(String dirname)</em> method of ClientDataSource to trace each connection flow in its own file for programs that have multiple connections.</li>
+</ol>
+<pre></pre>
+<a name="N101D3"></a><a name="DriverManager+Tracing"></a>
+<h4>DriverManager Tracing</h4>
+<pre>
+<br>If the DriverManager is used to obtain connections, two ways are available to 
+enable and collect tracing information. 
+</pre>
+<ul>
+<li>Use the <em>setLogWriter(java.io.PrintWriter)</em> method of DriverManager and set the PrintWriter to a non null value.</li>
+<li>Use the URL attributes <em>traceFile</em> or <em>traceDirectory</em> to set these properties prior to creating the connection with the <em>DriverManager.getConnection()</em> method.</li>
+</ul>
+<pre></pre>
+<a name="N101EC"></a><a name="-N101EC"></a>
+<h4>ClientDataSource Tracing Examples</h4>
+<pre>
+<br>Shown below are examples of each tracing type for the ClientDataSource 
+Tracing. 
+</pre>
+<ol>
+<li>Use the <em>setLogWriter(java.io.PrintWriter)</em> method of ClientDataSource and set the PrintWriter to a non null value.</li>
+</ol>
+<pre></pre>
+<pre>
+<span class="codefrag">/**
+*  Example to show how to set /enable tracing  when using DataSource
+*  - using the setLogWriter method on the datasource
+*/
+private static void sampleConnectUsingSimpleDataSource()
+ throws Exception
+{
+java.sql.Connection conn = null;
+ try
+ {
+javax.sql.DataSource ds =
+new org.apache.derby.jdbc.ClientDataSource();
+((org.apache.derby.jdbc.ClientDataSource) ds).setServerName("localhost");
+((org.apache.derby.jdbc.ClientDataSource) ds).setPortNumber(1527);
+((org.apache.derby.jdbc.ClientDataSource) ds).setDatabaseName("sampleDB;create=true");
+System.out.println("---------------------------------------------------------------");
+System.out.println("[TraceWithSetLogWriter]  Setting setLogWriter to trace.log.");
+System.out.println("Traces will be written into trace.log");
+java.io.PrintWriter pw = new PrintWriter(new FileOutputStream("trace.log"),true);
+ds.setLogWriter(pw);
+ 
+ 
+// Refine the level of tracing detail
+((org.apache.derby.jdbc.ClientDataSource) ds).
+setTraceLevel(org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTS |
+org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS);
+ 
+// This connection request is traced using trace level
+// TRACE_CONNECTS | TRACE_PROTOCOL_FLOWS
+conn = ds.getConnection("user1", "secretPassword");
+  java.sql.Statement s = conn.createStatement();
+try
+{
+ s.executeUpdate("DROP TABLE sampleTable");
+  }
+  catch(Exception e)
+  {
+  // ignore drop of table error
+}
+ 
+s.executeUpdate("CREATE TABLE sampleTable( sampleColumn int)");
+PreparedStatement ps = conn.prepareStatement("insert into sampleTable values(?)");
+ 
+  // do some inserts
+conn.setAutoCommit(false);
+ps.setInt(1,1);
+ps.setInt(1,2);
+ps.executeUpdate();
+conn.commit();
+ 
+// cleanup resources
+s.close();
+ps.close();
+conn.close();
+pw.flush();
+pw.close();
+}
+catch(java.sql.SQLException e)
+{
+e.printStackTrace();
+}
+}
+</span>
+
+</pre>
+<pre>  
+</pre>
+<ul>
+<li>Use the <em>setTraceFile(String filename)</em> method of ClientDataSource.</li>
+</ul>
+<pre></pre>
+<pre>
+<span class="codefrag">/**
+*  Example to show how to set /enable tracing when obtaining connections from DataSource
+*  - using the setTraceFile method on the datasource
+*/
+private static void sampleConnectUsingSimpleDataSource()
+ throws Exception
+{
+java.sql.Connection conn = null;
+ 
+ try
+ {
+javax.sql.DataSource ds =
+new org.apache.derby.jdbc.ClientDataSource();
+((org.apache.derby.jdbc.ClientDataSource) ds).setServerName("localhost");
+((org.apache.derby.jdbc.ClientDataSource) ds).setPortNumber(1527);
+((org.apache.derby.jdbc.ClientDataSource) ds).setDatabaseName("sampleDB;create=true");
+System.out.println("---------------------------------------------------------------");
+System.out.println("[TraceWithSetTraceFile]  Setting setTraceFile to trace.log.");
+System.out.println("Traces will be written into trace.log");
+((org.apache.derby.jdbc.ClientDataSource) ds).setTraceFile("trace.log");
+ 
+ 
+// Refine the level of tracing detail
+((org.apache.derby.jdbc.ClientDataSource) ds).
+setTraceLevel(org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTS |
+org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS);
+ 
+// This connection request is traced using trace level
+// TRACE_CONNECTS | TRACE_PROTOCOL_FLOWS
+conn = ds.getConnection("user1", "secretPassword");
+   java.sql.Statement s1 = conn.createStatement();
+try
+{
+ s1.executeUpdate("DROP TABLE sampleTable");
+  }
+  catch(Exception e)
+  {
+  // ignore drop of table error
+}
+ 
+s1.executeUpdate("CREATE TABLE sampleTable( sampleColumn int)");
+PreparedStatement ps = conn.prepareStatement("insert into sampleTable values (?)");
+ 
+conn.setAutoCommit(false);
+ps.setInt(1,1);
+ps.executeUpdate();
+conn.commit();
+ 
+// cleanup resources
+s1.close();
+ps.close();
+conn.close();
+}
+catch(java.sql.SQLException e) {
+e.printStackTrace();
+}
+}
+
+</span>
+
+</pre>
+<pre>  
+</pre>
+<ul>
+<li>Use the <em>setTraceDirectory(String dirname)</em> method of ClientDataSource to trace each connection flow in its own file for programs that have multiple connections.</li>
+</ul>
+<pre>
+<br>Call the <em>setTraceDirectory(String directoryName)</em> method on the 
+ClientDataSource or use the URL attribute traceDirectory=&lt;directory&gt; to 
+specify a directory for trace output. The directory must already exist. If the 
+traceDirectory property is enabled, then tracing of multiple connections on the 
+same datasource will be directed to separate files under the specified 
+directory. 
+<br>When tracing to a directory, each connection will be traced to a separate 
+file named traceFile_origination_n, where origination indicates the origination 
+of the log writer in use and can be "xads", "cpds", "ds", or "driver", 
+and n represents the nth connection against the datasource. The log writer 
+origination indicator in the file name maps to the log writer as follows: 
+</pre>
+<ul>
+<li>ds - ClientXADataSource</li>
+<li>cpds - ClientConnectionPoolDataSource</li>
+<li>ds - ClientDataSource</li>
+<li>driver - ClientDriver</li>
+</ul>
+<pre></pre>
+<pre> 
+<span class="codefrag">/**
+*  Example to show how to set /enable tracing when obtaining connections from DataSource
+*  - using the setTraceDirectory method on the DataSource
+*/
+private static void sampleConnectUsingSimpleDataSource()
+ throws Exception
+{
+java.sql.Connection conn = null;
+ 
+try {
+javax.sql.DataSource ds =
+new org.apache.derby.jdbc.ClientDataSource();
+((org.apache.derby.jdbc.ClientDataSource) ds).setServerName("localhost");
+((org.apache.derby.jdbc.ClientDataSource) ds).setPortNumber(1527);
+((org.apache.derby.jdbc.ClientDataSource) ds).setDatabaseName("sampleDB;create=true");
+((org.apache.derby.jdbc.ClientDataSource) ds).setTraceDirectory("myTraceDir");
+ 
+conn = ds.getConnection("user1", "secretPassword");
+   java.sql.Statement s1 = conn.createStatement();
+try
+{
+ s1.executeUpdate("DROP TABLE sampleTable");
+  }
+  catch(Exception e)
+  {
+      System.out.println("First time, expected exception in drop table as table not yet created in database" +e.getMessage());
+}
+ 
+s1.executeUpdate("CREATE TABLE sampleTable( sampleColumn int)");
+PreparedStatement ps = conn.prepareStatement("insert into sampleTable values (?)");
+ 
+conn.setAutoCommit(false);
+ps.setInt(1,1);
+ps.executeUpdate();
+conn.commit();
+ 
+// cleanup resources
+s1.close();
+ps.close();
+conn.close();
+ 
+  // Each connection trace will be in a file of its own prefixed
+  // by name set using the setTraceFile
+  // example : traceFile_origination_n. n is the nth connection against the datasource.
+  // origination indicates the origination of the logwriter in use and can be
+  // cpds, xads, ds, driver
+Connection conn2 = ds.getConnection("user2","password2");
+conn2.close();
+}
+catch(java.sql.SQLException e) {
+e.printStackTrace();
+}
+}
+</span>
+
+</pre>
+<pre></pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N10230"></a><a name="-N10230"></a>
+<h4>DriverManager Tracing Examples</h4>
+<pre>
+<br>Shown below is an example of enabling tracing when obtaining connections 
+using the DriverManager API. 
+</pre>
+<ol>
+<li>Use the <em>setLogWriter(java.io.PrintWriter)</em> method of DriverManager and set the PrintWriter to a non null value.</li>
+</ol>
+<pre>
+
+<br>
+</pre>
+<pre>
+<span class="codefrag">/**
+*  Example to show how to set /enable tracing when obtaining connections from
+*  java.sql.DriverManager api.
+*  - using the setLogWriter method on the DriverManager api
+*/
+
+import java.sql.*;
+import javax.sql.*;       
+import org.apache.derby.jdbc.ClientDataSource;
+import java.io.PrintWriter;
+import java.io.FileOutputStream;
+
+...
+private static void sampleConnectWithURLUsingDriverManager()
+throws Exception
+{
+java.sql.Connection conn = null;
+ 
+try
+{
+Class.forName("org.apache.derby.jdbc.ClientDriver");
+}
+catch(ClassNotFoundException e)
+{
+System.out.println("[TraceWithSetLogWriter] Derby Client driver is not in the classpath.Check if derbyclient.jar is in your classpath!");
+return;
+}
+try
+{
+ System.out.println("---------------------------------------------------------------------");
+ System.out.println("Setting logging/tracing using setLogWriter on DriverManager to trace1.log");
+ java.sql.DriverManager.setLogWriter(new java.io.PrintWriter(new FileOutputStream("trace1.log")));
+}
+catch(Exception e)
+{
+System.out.println("[TraceWithSetLogWriter] Unable to set tracing/logging PrintWriter to trace.log");
+}
+ 
+// The traceLevel property is established through the URL syntax,
+// and driver tracing is directed to file "trace1.log"
+String databaseURL =
+"jdbc:derby://localhost:1527" +
+"/sampleDB;create=true;traceLevel=" +
+(org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS|org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTS);
+ 
+// Set other properties
+java.util.Properties properties = new java.util.Properties();
+properties.setProperty("user", "myname");
+properties.setProperty("password", "mypass");
+try
+{
+// This connection request is traced using trace level
+// TRACE_CONNECTS | TRACE_PROTOCOL_FLOWS
+conn = java.sql.DriverManager.getConnection(databaseURL, properties);
+ 
+  java.sql.Statement s = conn.createStatement();
+try
+{
+ s.executeUpdate("DROP TABLE sampleTable");
+  }
+  catch(Exception e)
+  {
+      System.out.println("First time, expected exception in drop table as table not yet created in database" +e.getMessage());
+}
+ 
+s.executeUpdate("CREATE TABLE sampleTable( sampleColumn int)");
+PreparedStatement ps = conn.prepareStatement("insert into sampleTable values(?)");
+ 
+  // do some inserts
+conn.setAutoCommit(false);
+ps.setInt(1,1);
+ps.setInt(1,2);
+ps.executeUpdate();
+conn.commit();
+ 
+// cleanup resources
+s.close();
+ps.close();
+conn.close();
+}
+catch(java.sql.SQLException e)
+{
+e.printStackTrace();
+}
+}
+</span>
+</pre>
+<pre></pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N10249"></a><a name="-N10249"></a>
+<h4>Changing the Default Trace Level</h4>
+<pre>
+<br>The trace level defaults to ClientDataSource.TRACE_ALL. The tracing can be 
+changed by calling the setTraceLevel(int level) method or setting the URL 
+attribute traceLevel, as shown below. </pre>
+<pre>
+<span class="codefrag">String url = "jdbc:derby://myhost.mydomain.com:1528/mydb" +
+ ";traceFile=/u/user1/trace.out" +
+ ";traceLevel=" +
+ org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS;
+DriverManager.getConnection(url,"user1","secret4me");
+
+</span>
+</pre>
+<pre>
+<br>This table lists the available tracing levels and values. 
+</pre>
+<table class="ForrestTable" cellspacing="1" cellpadding="4" border="1">
+<tbody>
+<tr>
+<th>Trace Level</th><th>Value</th>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_NONE</td><td>0x0</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTION_CALLS</td><td>0x1</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_STATEMENT_CALLS</td><td>0x2</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_RESULT_SET_CALLS</td><td>0x4</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_DRIVER_CONFIGURATION</td><td>0x10</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTS</td><td>0x20</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS</td><td>0x40</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_RESULT_SET_META_DATA</td><td>0x80</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_PARAMETER_META_DATA</td><td>0x100</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_DIAGNOSTICS</td><td>0x200</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_XA_CALLS</td><td>0x800</td>
+</tr>
+<tr>
+<td>org.apache.derby.jdbc.ClientDataSource.TRACE_ALL</td><td>0xFFFFFFFF;</td>
+</tr>
+</tbody>
+</table>
+<pre>
+<br>To specify more than one trace , use one of these techniques: 
+</pre>
+<ul>
+<li>Use bitwise OR (|) operators with two or more trace values. For example, to trace PROTOCOL flows and connection calls, specify this value for traceLevel:<br>
+<span class="codefrag">TRACE_PROTOCOL_FLOWS|TRACE_CONNECTION_CALLS</span>
+</li>
+<li>Use a bitwise complement ( ~ ) operator with a trace value to specify all except a certain trace. For example, to trace everything except PROTOCOL flows, specify this value for traceLevel:<br>
+<span class="codefrag">~TRACE_PROTOCOL_FLOWS</span>
+</li>
+</ul>
+<pre></pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N102B1"></a><a name="-N102B1"></a>
+<h3 class="boxed">Security</h3>
+<pre>
+<br>Derby network client allows you to select a security mechanism by specifying 
+a value for the securityMechanism property. You can set this property in one of 
+the following ways: 
+</pre>
+<ul>
+<li>When using the <em>DriverManager</em> interface, set <em>securityMechanism</em> in a <em>java.util.Properties</em> object before you invoke the form of the <em>getConnection</em> method which includes the <em>java.util.Properties</em> parameter.</li>
+<li>When using the <em>DataSource</em> interface, and you are creating and deploying your own <em>DataSource</em> objects, invoke the <em>DataSource.setSecurityMechanism</em> method after you create a <em>DataSource</em> object.</li>
+</ul>
+<pre>
+<br>The table below lists the security mechanisms the Derby network client 
+supports, and the corresponding property value to specify to obtain this 
+securityMechanism. The default security mechanism is the user ID only if no password is set and User ID and password if password is set.
+The default user, if none is specified is APP. 
+</pre>
+<pre></pre>
+<table class="ForrestTable" cellspacing="1" cellpadding="4" border="1">
+<tbody>
+<tr>
+<th colspan="2">Security mechanisms supported by the Derby network client</th>
+</tr>
+<tr>
+<th>Security mechanism</th><th>securityMechanism property value</th><th>Comments</th>
+</tr>
+<tr>
+<td>User ID and password</td><td>ClientDataSource.CLEAR_TEXT_PASSWORD_SECURITY (0x03)</td><td>Default if password is set</td>
+</tr>
+<tr>
+<td>User ID only</td><td>ClientDataSource.USER_ONLY_SECURITY (0x04)</td><td>Default if password is not set</td>
+</tr>
+<tr>
+<td>Encrypted user ID and encrypted password</td><td>ClientDataSource.ENCRYPTED_USER_AND_PASSWORD_SECURITY (0x09)</td><td>Encryption requires a JCE Implementation that supports Diffie-Helman algorithm with a prime of 32 bytes</td>
+</tr>
+</tbody>
+</table>
+<pre>
+
+
+</pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N10306"></a><a name="-N10306"></a>
+<h3 class="boxed">Packaging, Distribution and Versioning</h3>
+<pre>
+<br>The Derby network client will assume the version of the Derby release in 
+which it is offered (currently thought to be 10.1). 
+<br>A new jar file, derbyclient.jar, needs to be added to the distribution, which 
+will contain the client classes. The client classpath will require only 
+derbyclient.jar to access the server. Demo programs and server framework batch 
+files and scripts will need to be changed to use the Derby network client. 
+</pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N10314"></a><a name="-N10314"></a>
+<h3 class="boxed">Comparision and/or differences with the Derby Embedded Driver</h3>
+<pre>
+<br>The following known differences exist between the embedded driver and the 
+network client driver. Many of these are already documented as Network Server 
+differences at <a href="http://db.apache.org/derby/docs/10.0/manuals/admin/hubprnt19.html#HDRSII-APPS-">http://db.apache.org/derby/docs/10.0/manuals/admin/hubprnt19.html#HDRSII-APPS-</a>. 
+Three differences that are listed in the server guide are not relevant with the 
+network client. XA is supported, error messages are retrieved by default and 
+user/password are not required. Below is a summary of the differences. 
+</pre>
+<ul>
+<li>Error messages and SQLStates are sometimes different and are sometimes null on the client, particularly for data conversion errors.</li>
+<li>Multiple SQL Exceptions and Warnings will only return a single Exception on the client. It will have the SQLState of the first exception and in the text will have the text of the additional Exceptions appended.</li>
+<li>There are no localized error messages for the client.</li>
+<li>The client driver has not been tested under security manager.</li>
+<li>The client driver fully materializes LOBS when the row is retrieved.</li>
+<li>Scrollable cursors (ResultSet.TYPE_SCROLL_SENSITIVE or ResultSet.TYPE_SCROLL_INSENSITIVE) are not supported if the resultset contains LOB data. TYPE_FORWARD_ONLY must be specified for result sets containing LOB data.</li>
+<li>To use encrypted user id and password, you need to have IBM JCE (Java Cryptography Extension) 1.2.1 or later. (DERBY-65)</li>
+</ul>
+<pre></pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N10334"></a><a name="-N10334"></a>
+<h3 class="boxed">Effects to existing documentation</h3>
+<pre>
+<br>The following Derby Manuals should be updated to include the new client 
+driver. The Server Guide, Tools and Getting Started guides at least will be 
+affected. Currently they document using the network server with the IBM DB2 
+Universal JDBC Driver. In general, the current documentation is relevant to the 
+new driver except for the items listed below. 
+</pre>
+<pre></pre>
+<table class="ForrestTable" cellspacing="1" cellpadding="4" border="1">
+<tbody>
+<tr>
+<th colspan="2">URL</th>
+</tr>
+<tr>
+<th>Derby Network Client URL</th><th>Documented URL</th>
+</tr>
+<tr>
+<td>jdbc:derby://server[:port]/databaseName[;attributeKey=value]..</td><td>jdbc:derby:net//server[:port]/databaseName[;embeddedAttributeKey=value]..:clientAttributeKey=value;.</td>
+</tr>
+</tbody>
+</table>
+<pre></pre>
+<pre></pre>
+<table class="ForrestTable" cellspacing="1" cellpadding="4" border="1">
+<tbody>
+<tr>
+<th colspan="3">Driver and DataSource Names</th>
+</tr>
+<tr>
+<th>JDBC Interface</th><th>Derby Network Client</th><th>Documented Class Name</th>
+</tr>
+<tr>
+<td>java.sql.Driver</td><td>org.apache.derby.jdbc.ClientDriver</td><td>com.ibm.db2.jcc.DB2Driver</td>
+</tr>
+<tr>
+<td>javax.sql.DataSource</td><td>org.apache.derby.jdbc.ClientDataSource</td><td>com.ibm.db2.jcc.DB2DataSource</td>
+</tr>
+<tr>
+<td>javax.sql.XADataSource</td><td>org.apache.derby.jdbc.ClientXADataSource</td><td>com.ibm.db2.jcc.DB2XADataSource</td>
+</tr>
+<tr>
+<td>javax.sql.ConnectionPoolDataSource</td><td>org.apache.derby.jdbc.ClientConnectionPoolDataSource</td><td>com.ibm.db2.jcc.DB2ConnectionPoolDataSource</td>
+</tr>
+</tbody>
+</table>
+<pre></pre>
+<pre></pre>
+<table class="ForrestTable" cellspacing="1" cellpadding="4" border="1">
+<tbody>
+<tr>
+<th colspan="3">Miscellaneous Changes</th>
+</tr>
+<tr>
+<th>&nbsp;</th><th>Derby Network Client</th><th>Documented</th>
+</tr>
+<tr>
+<td>jar file name</td><td>derbyclient.jar</td><td>db2jcc.jar, db2jcc_licence_c.jar</td>
+</tr>
+<tr>
+<td>attribute to retrieve message text*</td><td>retrieveMessageText (default true)</td><td>retrieveMessagesFromServerOnGetMessage (default false)</td>
+</tr>
+<tr>
+<td>required datasource property settings</td><td>databaseName only required property</td><td>requires databaseName, serverName,driverType, user, password</td>
+</tr>
+</tbody>
+</table>
+<pre> 
+<br>*Note: The retrieveMessageText attribute should not be included in most of 
+  the examples as it now defaults to true. 
+ <br>Client data source properties, tracing and security needs to be documented 
+  as described above. 
+</pre>
+<hr>
+<pre>
+
+</pre>
+<a name="N103A9"></a><a name="-N103A9"></a>
+<h3 class="boxed">Miscellaneous</h3>
+<pre></pre>
+<a name="N103B0"></a><a name="Tools"></a>
+<h4>Tools</h4>
+<pre>
+<br>ij will recognize the new URL and load the driver automatically. dblook will 
+accept the client URL. sysinfo has been changed to locate the new jar file. 
+</pre>
+<a name="N103B7"></a><a name="Testing"></a>
+<h4>Testing</h4>
+<pre>
+<br>You can run the client regression tests by running the suite 
+derbynetclientmats. You can run individual tests with the client framework by 
+setting the framework system property to DerbyNetClient. An example of this is 
+shown below. java -Dframework=DerbyNetClient 
+org.apache.derbyTesting.functionTests.harness.RunTest lang/supersimple.sql 
+
+<br>You can run the Derby network client test suite as follows:
+<br>java org.apache.derbyTesting.functionTests.harness.RunSuite derbynetclientmats
+
+</pre>
+<hr>
+<pre>
+<br>[<a href="index.html">Back to Derby Papers</a>]
+
+</pre>
+</div>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2004-2012 Apache Software Foundation</div>
+<div id="feedback">
+    Send feedback about the website to:
+  <a id="feedbackto" href="mailto:derby-user@db.apache.org?subject=Feedback%C2%A0papers/DerbyClientSpec.html">derby-user@db.apache.org</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Added: websites/production/db/content/derby/papers/DerbyTut/embedded.png
==============================================================================
Binary file - no diff available.

Propchange: websites/production/db/content/derby/papers/DerbyTut/embedded.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: websites/production/db/content/derby/papers/DerbyTut/embedded_intro.html
==============================================================================
--- websites/production/db/content/derby/papers/DerbyTut/embedded_intro.html (added)
+++ websites/production/db/content/derby/papers/DerbyTut/embedded_intro.html Wed Dec 19 18:20:21 2012
@@ -0,0 +1,644 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.8">
+<meta name="Forrest-skin-name" content="pelt">
+<title>Step 3: Embedded Derby</title>
+<link type="text/css" href="../../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../../skin/profile.css" rel="stylesheet">
+<script src="../../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://db.apache.org/">db</a><script src="../../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://db.apache.org/derby"><img class="logoImage" alt="Apache Derby" src="../../images/derby-logo-web.png" title="Derby is a zero-admin Java RDBMS"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogoA1">
+<a href="http://db.apache.org"><img class="logoImage" alt="Apache DB Project" src="../../images/db-logo-white.png" title="Apache DB creates and maintains database solutions."></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="../../index.html">Home</a>
+</li>
+<li>
+<a class="unselected" href="../../quick_start.html">Quick Start</a>
+</li>
+<li>
+<a class="unselected" href="../../derby_downloads.html">Download</a>
+</li>
+<li>
+<a class="unselected" href="../../derby_comm.html">Community</a>
+</li>
+<li>
+<a class="unselected" href="../../manuals/index.html">Documentation</a>
+</li>
+<li class="current">
+<a class="selected" href="../../blogs/index.html">Resources</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_1.1', '../../skin/')" id="menu_1.1Title" class="menutitle">Blogs and Articles About Derby</div>
+<div id="menu_1.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../blogs/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#blogs">Blogs</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3', '../../skin/')" id="menu_1.1.3Title" class="menutitle">Articles</div>
+<div id="menu_1.1.3" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.1.3.1', '../../skin/')" id="menu_1.1.3.1Title" class="menutitle">Tutorials, Tips and Tuning</div>
+<div id="menu_1.1.3.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../blogs/index.html#getstarted">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#features">Features, Hints and Tips</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#security">Security</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#performance">Performance and Tuning</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3.2', '../../skin/')" id="menu_1.1.3.2Title" class="menutitle">Tools and Migration</div>
+<div id="menu_1.1.3.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../blogs/index.html#tools">Tools</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#migration">Migration</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.3.3', '../../skin/')" id="menu_1.1.3.3Title" class="menutitle">Applications</div>
+<div id="menu_1.1.3.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../blogs/index.html#client">Client</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#middletier">Middle Tier</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#persistence">Persistence</a>
+</div>
+<div class="menuitem">
+<a href="../../blogs/index.html#scalability">Scalability and Failover</a>
+</div>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', '../../skin/')" id="menu_1.2Title" class="menutitle">Integration With Other Products</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../integrate/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../integrate/index.html#uses">What works with Derby?</a>
+</div>
+<div class="menuitem">
+<a href="../../integrate/index.html#products">Product Writeups</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.3', '../../skin/')" id="menu_1.3Title" class="menutitle">Eclipse Plug-ins</div>
+<div id="menu_1.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../integrate/derby_plugin_info.html">Info</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.4', '../../skin/')" id="menu_selected_1.4Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Papers and Presentations</div>
+<div id="menu_selected_1.4" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../papers/index.html">Overview</a>
+</div>
+<div onclick="SwitchMenu('menu_1.4.2', '../../skin/')" id="menu_1.4.2Title" class="menutitle">Derby Engine</div>
+<div id="menu_1.4.2" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.4.2.1', '../../skin/')" id="menu_1.4.2.1Title" class="menutitle">Javadoc</div>
+<div id="menu_1.4.2.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/engine">Engine</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/language">Language</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/tools">Tools</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/publishedapi">API</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../../papers/derby_arch.html">Architecture</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/btree_package.html">BTree</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/pageformats.html">Disk Page Format</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/derby_htw.html">How Things Work</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/Intersect-design.html">Intersect &amp; Except</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/JDBCImplementation.html">JDBC</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/logformats.html">Log Format</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/recovery.html">Logging &amp; Recovery</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/optimizer.html">Optimizer</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/engine/org/apache/derby/iapi/types/package-summary.html#package_description">Type System</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/versionupgrade.html">Versioning</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4.3', '../../skin/')" id="menu_1.4.3Title" class="menutitle">Derby Network Client</div>
+<div id="menu_1.4.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../papers/DerbyClientSpec.html">Functional Spec</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.4.4', '../../skin/')" id="menu_selected_1.4.4Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Derby Tutorial</div>
+<div id="menu_selected_1.4.4" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../papers/DerbyTut/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/DerbyTut/install_software.html">Step 1: Install Software</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/DerbyTut/ij_intro.html">Step 2: ij Basics</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">Step 3: Embedded Derby</div>
+</div>
+<div class="menuitem">
+<a href="../../papers/DerbyTut/ns_intro.html">Step 4: Derby Network Server</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4.5', '../../skin/')" id="menu_1.4.5Title" class="menutitle">Presentations</div>
+<div id="menu_1.4.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../papers/ApacheCon.html">ApacheCon</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/MiscPresentations.html#Victorian+Java+User+Group">Victorian JUG 2008</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/MiscPresentations.html#OSCON+2005">OSCON 2005</a>
+</div>
+<div class="menuitem">
+<a href="../../papers/MiscPresentations.html#Colorado+Software+Summit+2004">Colorado 2004</a>
+</div>
+</div>
+</div>
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<hr>
+<form action="http://www.google.com/search" method="get">
+<input value="db.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="18" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                  <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div class="trail">Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>Step 3: Embedded Derby</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#ij_intro">Introduction</a>
+</li>
+<li>
+<a href="#embedded_setup">Set the environment</a>
+</li>
+<li>
+<a href="#sample_app">Sample Application</a>
+<ul class="minitoc">
+<li>
+<a href="#copy_sample_app">Copy sample application</a>
+</li>
+<li>
+<a href="#em_lookat_code">A quick look at the code</a>
+<ul class="minitoc">
+<li>
+<a href="#embedded_driver">Load the Embedded JDBC Driver</a>
+</li>
+<li>
+<a href="#embedded_url">Get an Embedded Connection</a>
+</li>
+<li>
+<a href="#shutdown">Shut Derby down</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#compile_sample_app">Compile sample application</a>
+</li>
+<li>
+<a href="#run_sample_app">Run sample application</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#just_one_app">Embedded Derby supports multiple users in one JVM</a>
+</li>
+</ul>
+</div> 
+
+
+<a name="N1000D"></a><a name="ij_intro"></a>
+<h2 class="boxed">Introduction</h2>
+<div class="section">
+<p>
+When an application accesses a Derby database using the Embedded Derby JDBC
+driver,
+the Derby engine does not run in a separate process, and there are no
+separate database processes to start up and shut down.
+Instead, the Derby database engine runs inside the same
+Java Virtual Machine (JVM) as the application.
+So, Derby becomes part of the application 
+just like any other jar file that the application uses.
+Figure 1 depicts this embedded architecture.
+</p>
+<p>
+
+<strong>Figure 1: Derby Embedded Architecture</strong>
+
+</p>
+<p>
+
+<img alt="Figure 1: Embedded Architecture" src="embedded.png">
+</p>
+<p>
+This section shows how to compile and run a simple Java application using
+the Derby Embedded JDBC driver.
+The information presented is deliberately simple.
+For complete information, see the
+<a href="http://db.apache.org/derby/manuals/">Derby Developer's Guide</a>.
+</p>
+</div>
+
+
+<a name="N1002B"></a><a name="embedded_setup"></a>
+<h2 class="boxed">Set the environment</h2>
+<div class="section">
+<p>
+To set up the environment,
+follow the 
+"<a href="install_software.html#derby_configure">Configure Embedded Derby</a>"
+instructions.
+</p>
+</div>
+
+
+<a name="N10039"></a><a name="sample_app"></a>
+<h2 class="boxed">Sample Application</h2>
+<div class="section">
+<a name="N1003F"></a><a name="copy_sample_app"></a>
+<h3 class="boxed">Copy sample application</h3>
+<p>
+   The Derby software includes a sample application called 
+   <span class="codefrag">SimpleApp.java</span>.
+   In Derby 10.2 and above it is located in the
+   <span class="codefrag">DERBY_INSTALL/demo/programs/simple/</span> directory.
+   (In Derby 10.1 it is located in the
+   <span class="codefrag">DERBY_INSTALL/demo/simple/</span> directory.)
+   Copy that application into your current directory.
+   </p>
+<p>
+   By default this application runs in embedded mode and does the following:
+   </p>
+<ul>
+       
+<li> Starts up the Derby engine</li>
+       
+<li> Creates and connects to a database</li>
+       
+<li> Creates a table</li>
+       
+<li> Inserts data</li>
+       
+<li> Updates data</li>
+       
+<li> Selects data</li>
+       
+<li> Drops a table</li>
+       
+<li> Disconnects</li>
+       
+<li> Shuts down Derby</li>
+   
+</ul>
+<a name="N10073"></a><a name="em_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
+   creating a table, inserting data into that table, and selecting the
+   data back, demonstrating many JDBC calls as it does so.
+   This section highlights the JDBC calls that make this specifically an
+   embedded Derby application.
+   The "<a href="ns_intro.html#ns_lookat_code">Derby Network Server</a>"
+   section shows how the same JDBC calls turn the same code into a 
+   client/server application.
+   </p>
+<a name="N10083"></a><a name="embedded_driver"></a>
+<h4>Load the Embedded JDBC Driver</h4>
+<p>
+   The <span class="codefrag">SimpleApp</span> application
+   loads the Derby Embedded JDBC driver and starts Derby up with this code:
+   </p>
+<p class="code-block">public String driver = "org.apache.derby.jdbc.EmbeddedDriver";
+...
+Class.forName(driver).newInstance();
+</p>
+<a name="N10094"></a><a name="embedded_url"></a>
+<h4>Get an Embedded Connection</h4>
+<p>
+   The <span class="codefrag">SimpleApp</span> application
+   creates and connects to the <span class="codefrag">derbyDB</span> database with this code:
+   </p>
+<p class="code-block">public String protocol = "jdbc:derby:";
+...
+conn = DriverManager.getConnection(protocol + "derbyDB;create=true", props);
+</p>
+<p>
+   That embedded connection URL, fully constructed, looks like this:
+   </p>
+<p class="code-block">jdbc:derby:derbyDB;create=true</p>
+<a name="N100AF"></a><a name="shutdown"></a>
+<h4>Shut Derby down</h4>
+<p>A clean shutdown performs a checkpoint and releases resources. 
+      If an embedded application doesn't shut down Derby, 
+      a checkpoint won't be performed.
+      Nothing bad will happen; it just means that the next connection 
+       will be slower because Derby will run its recovery code.
+   </p>
+<p>Code to shut down a specific database looks like this: </p>
+<p class="code-block">DriverManager.getConnection("jdbc:derby:MyDbTest;shutdown=true");</p>
+<p>Code to shut down all databases and the Derby engine looks like this: </p>
+<p class="code-block">DriverManager.getConnection("jdbc:derby:;shutdown=true");</p>
+<p>The <span class="codefrag">SimpleApp.java</span> code uses the second call to shut down
+    all databases and the engine.
+    You might also notice that it tests for a SQL exception.
+    A clean shutdown always throws SQL exception <span class="codefrag">XJ015</span>, 
+    which can be ignored.
+   </p>
+<a name="N100D1"></a><a name="compile_sample_app"></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>
+<p>You can safely ignore any compile warnings that might pop up.</p>
+<a name="N100E2"></a><a name="run_sample_app"></a>
+<h3 class="boxed">Run sample application</h3>
+<p>
+   Run the sample application like this:
+   </p>
+<p class="code-block">java SimpleApp</p>
+<p>You should see the output shown below:</p>
+<p class="code-block">SimpleApp starting in embedded mode.
+Loaded the appropriate driver.
+Connected to and created database derbyDB
+Created table derbyDB
+Inserted 1956 Webster
+Inserted 1910 Union
+Updated 1956 Webster to 180 Grand
+Updated 180 Grand to 300 Lakeshore
+Verified the rows
+Dropped table derbyDB
+Closed result set and statement
+Committed transaction and closed connection
+Database shut down normally
+SimpleApp finished
+</p>
+<p>If instead you see an error like the one below, it means the class path
+   is not correctly set:
+   </p>
+<p class="code-block">java SimpleApp
+SimpleApp starting in embedded mode.
+exception thrown:
+java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
+        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
+        at java.security.AccessController.doPrivileged(Native Method)
+        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
+        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
+        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
+        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
+        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
+        at java.lang.Class.forName0(Native Method)
+        at java.lang.Class.forName(Class.java:141)
+        at SimpleApp.go(SimpleApp.java:77)
+        at SimpleApp.main(SimpleApp.java:61)
+SimpleApp finished
+</p>
+<p>
+   For help resolving class path problems, see the 
+   "<a href="install_software.html#derby_configure">Configure Embedded Derby</a>"
+   and
+   "<a href="install_software.html#derby_verify">Verify Derby</a>"
+   instructions.
+   </p>
+</div>
+
+
+<a name="N1010A"></a><a name="just_one_app"></a>
+<h2 class="boxed">Embedded Derby supports multiple users in one JVM</h2>
+<div class="section">
+<p>
+Derby supports multiple connections to a given database.
+An example of an embedded application that manages concurrent users 
+is a Tomcat or Geronimo application server that embeds Derby.
+Any number of users can execute Web applications that access a database
+through that Web server.
+</p>
+<p>
+However, only one JVM may boot ("open") that database, so
+multiple applications running in <em>different</em> JVMs
+cannot access the same database.
+To understand this better, do the following.
+</p>
+<p>
+The <span class="codefrag">SimpleApp</span> application created a database called
+<span class="codefrag">derbyDB</span>. 
+In one window connect to this database with
+<span class="codefrag">ij</span> as shown below:
+</p>
+<p class="code-block">java org.apache.derby.tools.ij
+ij version 10.4
+ij&gt; connect 'jdbc:derby:derbyDB';
+ij&gt;
+</p>
+</div>
+
+
+<p>
+Now, in another window try to run your <span class="codefrag">SimpleApp</span>
+application:
+</p>
+
+
+<p class="code-block">java SimpleApp
+SimpleApp starting in embedded mode
+Loaded the appropriate driver
+
+----- SQLException -----
+  SQL State:  XJ040
+  Error Code: 40000
+  Message:    Failed to start database 'derbyDB', see the next exception for details.
+
+----- SQLException -----
+  SQL State:  XSDB6
+  Error Code: 45000
+  Message:    Another instance of Derby may have already booted the database C:\Apache\db-derby-10.4.1.3-bin\tutorial\derbyDB.
+SimpleApp finished
+</p>
+
+
+<p>
+The connection that <span class="codefrag">SimpleApp</span> tries to establish fails because
+another application,
+<span class="codefrag">ij</span>,
+is already connected to the <span class="codefrag">derbyDB</span> database.
+</p>
+
+
+<p>
+The problem is <span class="codefrag">ij</span> and <span class="codefrag">SimpleApp</span> are running in
+different JVMs
+and a given database can only be accessed from one JVM. 
+The first application to connect "wins", in this case <span class="codefrag">ij</span>, and
+prevents other applications from connecting.
+</p>
+
+<p>
+In fact, you <em>can</em> establish multiple connections to a given database from
+different JVMs.
+That's the topic of the next section, 
+"<a href="ns_intro.html">Step 4: Derby Network Server</a>".
+</p>
+
+
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2004-2012 Apache Software Foundation</div>
+<div id="feedback">
+    Send feedback about the website to:
+  <a id="feedbackto" href="mailto:derby-user@db.apache.org?subject=Feedback%C2%A0papers/DerbyTut/embedded_intro.html">derby-user@db.apache.org</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Added: websites/production/db/content/derby/papers/DerbyTut/embedded_server.png
==============================================================================
Binary file - no diff available.

Propchange: websites/production/db/content/derby/papers/DerbyTut/embedded_server.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream