vgritsenko 2004/03/15 05:35:34
Modified: java/src/org/apache/xindice/core Collection.java Database.java Log: Do not ignore system initialization errors (and init() methods currently do not throw exceptions at all) Revision Changes Path 1.51 +4 -5 xml-xindice/java/src/org/apache/xindice/core/Collection.java Index: Collection.java =================================================================== RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/Collection.java,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- Collection.java 21 Feb 2004 03:56:11 -0000 1.50 +++ Collection.java 15 Mar 2004 13:35:34 -0000 1.51 @@ -498,16 +498,15 @@ * @return MetaData this collection's metadata. */ public MetaData getCollectionMeta() throws DBException { - MetaData meta = null; if (!isMetaEnabled()) { if (log.isWarnEnabled()) { log.warn("Meta information requested but not enabled in config!"); } - return meta; + return null; } MetaSystemCollection metacol = getMetaSystemCollection(); - meta = metacol.getCollectionMeta(this); + MetaData meta = metacol.getCollectionMeta(this); if (null == meta) { long now = System.currentTimeMillis(); meta = new MetaData(MetaData.COLLECTION, getCanonicalName(), now, now); 1.43 +7 -21 xml-xindice/java/src/org/apache/xindice/core/Database.java Index: Database.java =================================================================== RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/Database.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- Database.java 14 Mar 2004 04:56:54 -0000 1.42 +++ Database.java 15 Mar 2004 13:35:34 -0000 1.43 @@ -274,16 +274,8 @@ } if (!sysInit) { - this.systemCollection = new SystemCollection(this); - - try { - this.systemCollection.init(); - } catch (XindiceException e) { - if (log.isWarnEnabled()) { - log.warn("ignored exception", e); - } - } - + systemCollection = new SystemCollection(this); + systemCollection.init(); super.addCollection(systemCollection); this.sysInit = true; } @@ -318,17 +310,11 @@ if (metaCfg.equalsIgnoreCase("on")) { metaEnabled = true; if (!metaInit) { - this.metaSystemCollection = new MetaSystemCollection(this); - try { - this.metaSystemCollection.init(); - } catch (XindiceException e) { - log.warn("Error initializing the meta collection", e); - } - // should this attach the meta collection to the database? - + metaSystemCollection = new MetaSystemCollection(this); + metaSystemCollection.init(); super.addCollection(metaSystemCollection); metaInit = true; - log.info("Meta information initialized"); + log.debug("Meta information initialized"); } }