arminw 2005/03/28 17:17:01
Modified: src/doc/forrest/src/documentation/content/xdocs/docu/guides
Tag: OJB_1_0_RELEASE odmg-guide.xml pb-guide.xml
src/doc/forrest/src/documentation/content/xdocs/docu Tag:
OJB_1_0_RELEASE faq.xml
src/doc/forrest/src/documentation/content/xdocs Tag:
OJB_1_0_RELEASE site.xml
Log:
update odmg-api, use of multiple DB
Revision Changes Path
No revision
No revision
1.1.2.3 +59 -1
db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/Attic/odmg-guide.xml
Index: odmg-guide.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/Attic/odmg-guide.xml,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- odmg-guide.xml 28 Mar 2005 11:33:37 -0000 1.1.2.2
+++ odmg-guide.xml 29 Mar 2005 01:17:01 -0000 1.1.2.3
@@ -582,7 +582,65 @@
</section>
+ <anchor id="multiple-databases"/>
+ <section>
+ <title>How to use multiple Databases</title>
+ <p>
+ For each database define a
+ <link
href="site:repository/jdbc-connection-descriptor">jdbc-connection-descriptor</link>
same way
+ as described in the <link
href="site:faq/multiple-databases">FAQ</link>.
+ </p>
+ <p>
+ Now it is possible to
+ </p>
+ <ul>
+ <li>
+ <p>
+ access the databases one after another, by
closing the current used <code>Database</code>
+ instance and by open a new one.
+ </p>
+ <source><![CDATA[
+// get current used database instance
+Database database = ...;
+// close it
+database.close();
+// open a new one
+database = odmg.newDatabase();
+database.open("jcdAliasName#user#password", Database.OPEN_READ_WRITE);
+...]]></source>
+ <p>
+ The <code>Database.close()</code> call close the
current used <code>Database</code> instance,
+ after this it is possible to open a new database
instance.
+ </p>
+ </li>
+ <li>
+ <p>
+ use multiple databases in parallel, by creating
a separate <code>Implementation</code>
+ and <code>Database</code> instance for each
+ <link
href="site:repository/jdbc-connection-descriptor">jdbc-connection-descriptor</link>
+ defined in the mapping metadata.
+ </p>
+ <source><![CDATA[
+Implementation odmg_1 = OJB.getInstance();
+Database database_1 = odmg.newDatabase();
+database.open("db_1#user#password", Database.OPEN_READ_WRITE);
+Implementation odmg_2 = OJB.getInstance();
+Database database_2 = odmg.newDatabase();
+database.open("db_2#user#password", Database.OPEN_READ_WRITE);
+ ]]></source>
+ <p>
+ Now it's possible to use both databases in
parallel.
+ </p>
+
+ </li>
+ </ul>
+ <note>
+ OJB does not provide distributed transactions by itself.
To use distributed transactions,
+ OJB have to be <link
href="site:deployment/j2ee-server">integrated in an j2ee conform
environment</link>
+ (or made work with an JTA/JTS implementation).
+ </note>
+ </section>
</section>
1.1.2.2 +22 -1
db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/Attic/pb-guide.xml
Index: pb-guide.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/Attic/pb-guide.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- pb-guide.xml 24 Mar 2005 17:54:17 -0000 1.1.2.1
+++ pb-guide.xml 29 Mar 2005 01:17:01 -0000 1.1.2.2
@@ -146,6 +146,27 @@
</section>
+ <anchor id="questions"/>
+ <section>
+ <title>Questions</title>
+
+ <anchor id="multiple-databases"/>
+ <section>
+ <title>How to use multiple Databases</title>
+ <p>
+ For each database define a
+ <link
href="site:repository/jdbc-connection-descriptor">jdbc-connection-descriptor</link>
same way
+ as described in the <link
href="site:faq/multiple-databases">FAQ</link>.
+ </p>
+ <p>
+ Now each database will be accessible via the
<code>PersistenceBrokerFactory</code> using a
+ <code>PBKey</code> matching the defined
<em>jcdAliase</em> name as shown in section
+ <link href="#lookup-pb"><em>How to access the
PB-api?</em></link>.
+ </p>
+ </section>
+
+ </section>
+
</body>
</document>
No revision
No revision
1.1.2.7 +6 -2
db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml
Index: faq.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- faq.xml 24 Mar 2005 17:54:17 -0000 1.1.2.6
+++ faq.xml 29 Mar 2005 01:17:01 -0000 1.1.2.7
@@ -1126,7 +1126,11 @@
>
...
</jdbc-connection-descriptor>]]></source>
-
+ <p>
+ Specific notes related to the <link
href="site:pb-guide/multiple-databases">PB-api here</link>.
+ <br/>
+ Specific notes related to the <link
href="site:odmg-guide/multiple-databases">ODMG-api here</link>.
+ </p>
<note>
OJB does not provide distributed transactions by itself.
To use distributed transactions,
OJB have to be <link
href="site:deployment/j2ee-server">integrated in an j2ee conform
environment</link>
No revision
No revision
1.3.2.12 +3 -1
db-ojb/src/doc/forrest/src/documentation/content/xdocs/site.xml
Index: site.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/site.xml,v
retrieving revision 1.3.2.11
retrieving revision 1.3.2.12
diff -u -r1.3.2.11 -r1.3.2.12
--- site.xml 28 Mar 2005 11:33:37 -0000 1.3.2.11
+++ site.xml 29 Mar 2005 01:17:01 -0000 1.3.2.12
@@ -96,11 +96,13 @@
<summary label="Summary" href="summary.html"/>
<pb-guide label="PB-api guide" href="pb-guide.html">
<lookup-pb href="#lookup-pb"/>
+ <multiple-databases href="#multiple-databases"/>
</pb-guide>
<odmg-guide label="ODMG-api guide" href="odmg-guide.html">
<no-oql href="#no-oql"/>
<lookup-odmg href="#lookup-odmg"/>
<metadata href="#metadata"/>
+ <multiple-databases href="#multiple-databases"/>
</odmg-guide>
<platform label="Platform settings" href="platforms.html"
description=""/>
<ojb-properties label="OJB.properties File"
href="ojb-properties.html" description=""/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]