Author: arminw
Date: Wed May 24 03:35:09 2006
New Revision: 409122
URL: http://svn.apache.org/viewvc?rev=409122&view=rev
Log:
add docs for repository.xml settings, see OJB-109
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/metadata.xml
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/metadata.xml
URL:
http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/metadata.xml?rev=409122&r1=409121&r2=409122&view=diff
==============================================================================
---
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/metadata.xml
(original)
+++
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/metadata.xml
Wed May 24 03:35:09 2006
@@ -99,6 +99,15 @@
</section>
+ <anchor id="load-repository"/>
+ <section>
+ <title>How does OJB load the metadata</title>
+ <p>
+ Please see <a
href="site:repository/load-repository">repository file "loading settings"</a>.
+ </p>
+ </section>
+
+
<section>
<title>Connection metadata</title>
<p>
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
URL:
http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml?rev=409122&r1=409121&r2=409122&view=diff
==============================================================================
---
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
(original)
+++
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
Wed May 24 03:35:09 2006
@@ -86,6 +86,48 @@
</section>
+ <anchor id="load-repository"/>
+ <section>
+ <title>Repository loading settings</title>
+ <p>
+ For correct loading of the repository file the
<code>repository.xml</code> file (with all sub files)
+ and the <code>repository.dtd</code> have to be in the same
place (directory, jar, ...).
+ </p>
+ <p>
+ By default OJB first lookup the repository file setting in
system properties using keyword
+ <em>repository.xml</em>:
+ </p>
+ <source><![CDATA[
+System.getProperties().getProperty("repository.xml" , null);
+]]></source>
+ <p>
+ Thus the filename/path of the repository file can be changed
by setting a Java system property.
+ This can be done programmatically:
+ </p>
+ <source><![CDATA[
+System.setProperty("repository.xml","mypath/repository.xml");]]></source>
+ <p>
+ or by setting a -D option to the JVM:
+ </p>
+ <source><![CDATA[
+ java -Drepository.xml=myOwnMapping my.own.ojb.Application]]></source>
+ <p>
+ If not set OJB use the setting in <a
href="site:ojb-properties">OJB.properties</a> file:
+ </p>
+ <source><![CDATA[
+#----------------------------------------------------------------------------------------
+# repository file settings
+#----------------------------------------------------------------------------------------
+# The repositoryFile entry tells OJB to use this file as as its standard
mapping
+# repository. The file is first looked up from the classpath, second as
ordinary file.
+#
+repositoryFile=repository.xml
+]]></source>
+ <p>
+ If all else fails OJB simply use the path specified for <a
href="site:ojb-properties">OJB.properties</a>
+ file (without <em>"OJB.properties"</em> ending) and add the
repository file setting.
+ </p>
+ </section>
<anchor id="descriptor-repository"/>
<section>
@@ -231,6 +273,7 @@
attribute is a shortcut name for the defined
connection descriptor. OJB
uses the jcd alias as key for the defined connections.
</p>
+ <anchor id="default-connection"/>
<p>
The
<em>default-connection</em>
@@ -491,7 +534,7 @@
<p>
<em>maxActive</em> (default=21)
The maximum number of active connections that can be allocated from
this
- pool at the same time, or zero for no limit.
+ pool at the same time, or -1 for no limit.
</p>
<p>
<em>maxIdle</em> (default=-1)
@@ -526,7 +569,7 @@
If specified, this query <strong>must</strong> be an SQL SELECT
statement
that returns at least one row.
<br/>
- If not specified, only <em>connection.isClosed()</em>
checks
+ If this attribute is not specified, only
<em>connection.isClosed()</em> checks
will be performed according to
testOnBorrow/testOnReturn/testWhileIdle.
</p>
<note>
@@ -537,6 +580,9 @@
Consider specifying a validation query that fits your
database server
and set at least testOnBorrow=true.
<br/>
+ If supported by the jdbc-driver another option is to
enable connection
+ <em>reconnect</em> (e.g. mysql enable
<em>autoReconnect=true</em>) instead
+ of using a validation query.
</note>
<p>
Example validation queries:
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]