I have just committed the initial proposal for the merged RBDMS store into the proposal section of the CVS. It should work with the current ACL-12 implementation, although no extensive testing has been done yet.
To sum things up:
- Adapter concept has been taken over from the work initally done by Christopher Lenz to enable usage both with datasources configured in a J2EE container and connections configured in Domain.xml. J2EE and JDBC store share a common code base that mainly differs in the way a new connection is created. - Added some code from Christophe Lombart to allow for connection pooling with the JDBC store using DBCP. - The database schema and most of the SQL has been taken over from the store provided by Ashok in this list. It should still be compatible to the old schema: - Ordering of ACEs has been added using an added row - Some really minor stuff changed to make tables work with Sybase as well - Statements have been combined and turned into prepared ones (with substantial contribution from my collegue Daniel Florey :) - Removed minor "myRevisionDescriptor"-hack - The proposal should work with MS SQLServer and Sybase
Open issues:
- Some sort of deadlocks occur on delete and insert when having an isolation level higher than read committed. This happens even with a single request. Maybe this is problem with reads outside of transactions? Have to check this. - When looking at the database schema we noticed allmost all requests use the URI table to map URI to ID. This very likely will limit scalability under concurrent access. I'd propose to change the DB schema to have redundant URI strings in all tables that have foreign key to the URI table. Keys and foreign keys would still be IDs. Drawback would be redundancy and imcompatibility to the old schema. - Ports to other major databases: I can do Oracle, but will need help with others. I think we already found volunteers to do MySQL and Postgres. DB2 volunteers would be nice... - This implmentation still lacks reasonable performance in my very simple test scenario. What do you folks say? - There still is some confusion about how to handle branches and revisions - Tests need to be run
Configuration:
When using the standalone variant, the respective fragment in your Domain.xml might look like. Be sure to have the "SelectMethod=cursor" property set in the JDBC url.
... <store name="SQLServerStore" classname="org.apache.slide.store.ExtendedStore"> <nodestore classname="org.apache.slide.store.impl.rdbms.JDBCStore"> <parameter name="adapter">org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter</parameter> <parameter name="driver">com.microsoft.jdbc.sqlserver.SQLServerDriver</parameter> <parameter name="url">jdbc:microsoft:sqlserver://moe.finix.de:1433;DatabaseName=Slide;SelectMethod=cursor</parameter> <parameter name="user">[user]</parameter> <parameter name="password">[password]</parameter> <parameter name="dbcpPooling">true</parameter> <parameter name="maxPooledConnections">10</parameter> <parameter name="isolation">READ_COMMITTED</parameter> <!-- adapter parameters --> <parameter name="compress">true</parameter> ... </store> ...
When using the J2EE variant you only have to configure the JNDI name for the datasource (e.g. jdbc/datasource):
... <store name="SQLServerStore" classname="org.apache.slide.store.ExtendedStore"> <nodestore classname="org.apache.slide.store.impl.rdbms.J2EEStore"> <parameter name="adapter">org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter</parameter> <parameter name="datasource">jdbc/datasource</parameter> <!-- adapter parameters --> <parameter name="compress">true</parameter> ... </store> ...
Certainly I have forgotten something ;)
Oliver
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
