cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Configuring OJB and HSQLDB
Date Tue, 18 Jan 2005 12:30:13 GMT
Hi All

I have been working on adding the ability to save favourite queries to 
HSQLDB using OBJ, to the QueryBean Block in trunk.

While doing this work, several issues arose in the configuration of OJB 
in Cocoon.

Even though the was 
specified in OJB's repository.xml, it was not possible to use this (via 
autoincrement="true") as the Tables that HSQLDB required to track the 
sequences were missing from cocoon.db and the mapping for the sequences 
(repository_internal.xml) were missing from OJB.

I expect to add both of these during my commit of the new QueryBean 

Custom Config:
Any block that wants to make use of OJB and HSQLDB has to have extra 
configuration added to both the database block (to add the Tables) and 
the OJB block (to add the mappings).
At the moment, Tables are created by adding new commands to the 
Database Block's 'conf/cocoon.db', and new OJB Mappings are made by 
adding them to OJB Block's conf/repository.xml.

This does not seem like a great solution to me.

While it is likely that cocoon.db is not such a big issue, because most 
people would probably replace HSQLDB on major projects and therefore 
find a better way to populate their RDBMS.

Is it worth looking for a way for Blocks to add their own Table 
creating commands to cocoon.db in the Database block?

I think that the situation with OBJ could easily be improved.

OJB typically uses Entities to import multiple repository_*.xml files 
into the primary repository.xml file used to declare mappings and 
database access. I am using this technique to add (the standard) 
'repository_internal.xml' to handle DB Sequences.

I propose that we add an empty "repository_user.xml" file (with 
associated Entity-based import) so that that file can act as a standard 
target for projects that use OJB to use XConfPatch Task to add their 
mappings to OJB. I suspect though that this would require that the 
build processes blocks in a predictable order, and I do not know if 
that happens.


regards Jeremy

Life has surface noise

John Peel
View raw message