path: DBObserver::createCollection Index: org/apache/xindice/core/DBObserver.java =================================================================== RCS file: /home/cvspublic/xml-xindice/java/src/org/apache/xindice/core/DBObserver.java,v retrieving revision 1.2 diff -u -r1.2 DBObserver.java --- org/apache/xindice/core/DBObserver.java 31 Oct 2002 06:59:56 -0000 1.2 +++ org/apache/xindice/core/DBObserver.java 10 Jul 2003 10:29:03 -0000 @@ -27,6 +27,9 @@ public void dropCollection( Collection col ) throws DBException {} + public void createCollection( Collection col ) + throws DBException {} + public void putDocument( Collection col, Key key, Document document, boolean create ) throws DBException {} @@ -79,6 +82,12 @@ * Called before Collection.drop() */ public abstract void dropCollection( Collection col ) + throws DBException; + + /** + * Called after Collection.create() + */ + public abstract void createCollection( Collection col ) throws DBException; /**
=================================================================== end of Index: org/apache/xindice/core/DBObserver.java Index: org/apache/xindice/core/Collection.java =================================================================== RCS file: /home/cvspublic/xml-xindice/java/src/org/apache/xindice/core/Collection.java,v retrieving revision 1.18 diff -u -r1.18 Collection.java --- org/apache/xindice/core/Collection.java 13 Jun 2003 14:09:13 -0000 1.18 +++ org/apache/xindice/core/Collection.java 10 Jul 2003 10:46:35 -0000 @@ -516,6 +516,8 @@ public boolean create() throws DBException { // update the meta information if necessary updateCollectionMeta(); + + DBObserver.getInstance().createCollection(this); return true; } =================================================================== end of Index: org/apache/xindice/core/Collection.java On Wed, 2003-07-09 at 20:31, Viner, David wrote: > I believe there is no DBObserver createCollection method because the > Database might not be informed when a new collection is created. The > Collection::create method does not have any interaction with the Database. > Of course, it could, in the same way that Collection::drop interacts with > the Database. This seems like a reasonable idea to me, so please formulate > a patch against the cvs version, and submit it to the list for review. > > thanks > dave > > > -----Original Message----- > From: Igor [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 02, 2003 6:59 AM > To: [EMAIL PROTECTED] > Subject: DBObserver issue > > > Hi All! > > I need monitor Database activity via DBObserver. The create collection > call back is missing. DBObserver has method dropCollection, but no > method createCollection. How can I known that collection is created. If > is possible to add createCollection in DBObserver interface and one line > in ..core.Collection. > > p.s. Now I do intensive code review on Xindice code. how to report or > discus issues or bugs(we don't writes bugs , just features:-) > > Best Regards > > Igor >