Mail Archive Home | exoplatform List | August 2006 Index
Exo platform: product vs framework
- Subject: Exo platform: product vs framework
- From: Gabriela Chiribau <gabriela@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 15 Aug 2006 19:49:50 -0500
- Disposition-notification-to: Gabriela Chiribau <gabriela@halcyonsolutions.biz>
Greetings,
In order to use Exo platform as a product, one should be able to
configure without having to recompile.
What is the best way to override the ECM/jcr database configuration?
E.g if I add a configuration file to ecm/WEB-INF/conf/configuration.xml
the configuration.xml from the jcr is executed first, in my case with
mysql 4.1 the JCR_SITEM is sucesssfully created (while in 4.0 would
fail), but 4.1 automatically converts VARCHAR(1024) to text. So the next
index statement will fail because it requires an index length for a TEXT
field. When my desired override configuration is called again, it fails,
as the table already exists.
The more general problem would be: how do we change the database for
exo-jcr without having to recompile exo-jcr, in the case the database
creation scripts are different.
If I modify the configuration in exo-jcr, I have to recompile exo-jcr...
which defeats the purpose of using exo as a product rather then as a
framework.
Thank you,
Gabriela
PS 1
(The way I solved the problem for the moment was to let the default
script create the first table, modify the custom script by adding a IF
NOT EXISTS and removing the index the first script already created. All
the remaining tables are created by the second script. I would call
this process at least "too creative" :P and not very valid for a
production environment.)
Here is the MySQL 4.1 Script: (after removing the utf8 support probably
it would be safe to increase the length of the indexes
CREATE TABLE IF NOT EXISTS JCR_SITEM(
ID VARCHAR(255) NOT NULL PRIMARY KEY,
VERSION INTEGER NOT NULL,
CONTAINER_NAME VARCHAR(255) NOT NULL,
PATH TEXT NOT NULL
);
CREATE INDEX JCR_IDX_SITEM_PATH ON JCR_SITEM(PATH(166),
CONTAINER_NAME(166));
CREATE INDEX JCR_IDX_SITEM_CONTAINER_NAME ON JCR_SITEM(CONTAINER_NAME(166));
CREATE TABLE JCR_SNODE(
ID VARCHAR(255) NOT NULL PRIMARY KEY,
ORDER_NUM INTEGER,
PARENT_ID VARCHAR(255),
CONSTRAINT JCR_FK_SNODE_PARENT FOREIGN KEY(PARENT_ID) REFERENCES
JCR_SNODE(ID),
CONSTRAINT JCR_FK_SNODE_ITEM FOREIGN KEY(ID) REFERENCES
JCR_SITEM(ID)
);
CREATE INDEX JCR_IDX_SNODE_PARENT ON JCR_SNODE(ID(166), PARENT_ID(166),
ORDER_NUM);
CREATE TABLE JCR_SPROPERTY(
ID VARCHAR(255) NOT NULL PRIMARY KEY,
TYPE INTEGER NOT NULL,
PARENT_ID VARCHAR(255) NOT NULL,
MULTIVALUED TINYINT NOT NULL,
CONSTRAINT JCR_FK_SPROPERTY_NODE FOREIGN KEY(PARENT_ID)
REFERENCES JCR_SNODE(ID),
CONSTRAINT JCR_FK_SPROPERTY_ITEM FOREIGN KEY(ID) REFERENCES
JCR_SITEM(ID)
);
CREATE INDEX JCR_IDX_SPROPERTY_PARENT ON JCR_SPROPERTY(ID(166),
PARENT_ID(166));
CREATE INDEX JCR_IDX_SPROPERTY_TYPE ON JCR_SPROPERTY(ID(166), TYPE);
CREATE TABLE JCR_SVALUE(
ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY,
DATA LONGBLOB NOT NULL,
ORDER_NUM INTEGER,
PROPERTY_ID VARCHAR(255) NOT NULL,
CONSTRAINT JCR_FK_SVALUE_PROPERTY FOREIGN KEY(PROPERTY_ID)
REFERENCES JCR_SPROPERTY(ID)
);
CREATE INDEX JCR_IDX_SVALUE_PROPERTY ON JCR_SVALUE(PROPERTY_ID(166),
ORDER_NUM);
CREATE INDEX JCR_IDX_SVALUE_DATA ON JCR_SVALUE(PROPERTY_ID(166), DATA(166));
PS 2
It looks there are 2 additional scripts: one for mysql 4.0 and one for
mysql 4.1 :) I wonder if anyone is still using mysql 4.0.... even
Slackware, probably the most conservative distro is on 4.1... I got 4.0
with the default installation of Xandros, but decided to upgrade to 4.1,
too many versions with too many differences to support... :P
begin:vcard
fn:Gabriela Chiribau
n:Chiribau;Gabriela
org:Halcyon Consulting LLC
adr:;;PO BOX 189;Pearland;TX;77588;US
email;internet:gabriela@xxxxxxxxxxxxxxxxxxxx
title:CEO
tel;work:916 705 5517
tel;fax:832 201 9852
tel;pager:keelath@xxxxxxxxx
tel;cell:916 705 5517
x-mozilla-html:FALSE
url:http://www.halcyon-solutions.com
version:2.1
end:vcard
- Exo platform: product vs framework,
Gabriela Chiribau
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.