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 Vadim Gritsenko <va...@verizon.net> on 2003/07/30 02:42:21 UTC

[PATCH] Fix collection initialization order, was: XTools adds user.dir to absolute paths

Vadim Gritsenko wrote:

> Kevin Ross wrote:
>
>> Now, how about that ' XINDICE_HOME catch 22' patch?  ;)
>

Almost ready! There is one issue though. There were some recent changes 
in the CollectionManager and I feel that those broke something. Change 
I'm talking about is here, on the last page:
  
http://cvs.apache.org/viewcvs.cgi/xml-xindice/java/src/org/apache/xindice/core/CollectionManager.java.diff?r1=1.10&r2=1.11&diff_format=h

With this change, during initialization of the 'system' (and 'meta') 
collection, col.setConfig(cfg) for nested collections (like SysConfig, 
SysSymbols) is being called way before collection sets its own root via 
setCollectionRoot() in Collection.setConfig() method, around line 1358.

The result of such behavior is not pretty. Here is resulting directory 
structure:

$HOME
$HOME/bin
$HOME/bin/Metas
$HOME/bin/Metas/Metas.tbl
$HOME/bin/SysConfig/SysConfig.tbl
$HOME/bin/SysSymbols/SysSymbols.tbl
$HOME/db
$HOME/db/meta
$HOME/db/system
...

Result was achived by doing: "xindice lc -l -c /db -d 
..\config\system.xml" in the $HOME/bin directory.

Patch is quite simple and attached. Once applied, I'll send next patch - 
for catch 22 problem :)

Vadim