You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by ks...@apache.org on 2002/01/29 09:15:21 UTC
cvs commit: xml-xindice/java/examples/Addressbook/src/java/addressbook DBConnection.java
kstaken 02/01/29 00:15:21
Modified: java/examples/Addressbook/src/java/addressbook
DBConnection.java
Log:
Changing the example from dbxml to xindice.
Revision Changes Path
1.2 +7 -7 xml-xindice/java/examples/Addressbook/src/java/addressbook/DBConnection.java
Index: DBConnection.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/examples/Addressbook/src/java/addressbook/DBConnection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DBConnection.java 6 Dec 2001 19:33:52 -0000 1.1
+++ DBConnection.java 29 Jan 2002 08:15:20 -0000 1.2
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: DBConnection.java,v 1.1 2001/12/06 19:33:52 bradford Exp $
+ * $Id: DBConnection.java,v 1.2 2002/01/29 08:15:20 kstaken Exp $
*/
import org.xmldb.api.base.*;
@@ -75,22 +75,22 @@
public class DBConnection extends HttpServlet {
// Collection manager path to instantiate
- public static final String DBXMLURI="dbxml:///db/";
- public static final String COLLECTIONURI="xmldb:" + DBXMLURI;
+ public static final String XINDICEURI="xindice:///db/";
+ public static final String COLLECTIONURI="xmldb:" + XINDICEURI;
String colstring = COLLECTIONURI + "addressbook";
protected static DBConnection connection = new DBConnection();
- protected static Database dbxml = null;
+ protected static Database db = null;
protected static Collection collection = null;
public Collection getCollectionInstance(HttpServletRequest request, HttpServletResponse response ) throws javax.servlet.ServletException, java.io.IOException {
try {
- if ( dbxml == null ) {
+ if ( db == null ) {
// Register the dbxml database handler
- dbxml = (Database)Class.forName("org.apache.xindice.client.xmldb.DatabaseImpl").newInstance();
- DatabaseManager.registerDatabase(dbxml);
+ db = (Database)Class.forName("org.apache.xindice.client.xmldb.DatabaseImpl").newInstance();
+ DatabaseManager.registerDatabase(db);
// Get a collection instance
collection = DatabaseManager.getCollection( colstring );
}