Hi Steve, Jeffrey,
Thanks for your answers and explanations.
Lihn, Steve wrote:
Ludovic,
You have made quite some progress on MySQL conversion. Impressive...
This is Perl which is impressive ;-) There is some preliminary materials
(perl, sql) on my Lokahi wiki page :
http://www.ubik-products.com/ludowiki/Lokahi . But this is far from
complete [and bug free].
A database abstraction layer has to be added to Lokahi in order to support
different flavors of databases. Hibernate may be a good choice... Not sure
how much java code changes are needed... Is it possible to hook
org.apache.lokahi.core.common.database.[Derby|Oracle]Broker into Hibernate?
Or a new abstraction layer is needed to sit on top of Hibernate?
I must say that i didn't really understand how works the Derby and
Oracle broker yet, why is there 2 brokers instantiated in
o.a.l.core.database.CachingBroker ? is the cacheBroker member used?
Should i hardcode the use of a MySqlBroker instead of the OracleBroker
here? shouldn't we have something a little bit configurable ? ... i will
investigate. For the work required to move to an ORM framework (why not
OJB?), i didn't know enough the application yet to estimate, but there
is some work, sure :-)
Lokahi was ported from an in-house project which was _VERY_ Oracle-based.
All the referential cursor embedded in function calls have to be converted
into plain views in order to be compatible with MySQL. They are defined in
db.properties. As you said, the two object types are not good for MySQL
either. It can be taken care of by java code easily as you said.
Yep, i will use prepared statements and Java code. I didn't see - but i'
m not an expert in db - the benefit to use views instead of simple
select statements ?
There are a few blobs in Oracle that have to be handled correctly in MySQL.
I believe Hibernate can take care of that too.
Steve Lihn
Many thanks for your hints Steve! So i will hack happily in the code and
attach my patches to an issue if i find the JIRA :-) (But perhaps i
should wait for the dev team to refactor the code)
Best regards, and thanks again,
-----Original Message-----
From: Ludovic Maitre [mailto:[EMAIL PROTECTED]
Sent: Monday, September 18, 2006 7:08 AM
To: [email protected]
Subject: MySQL support ?
Hi all,
I'm very interested in Lokahi, and i don't know of other OSS
alternatives which fit my needs like it, but unfortunately i haven't
Oracle or an Oracle license, so i would like to use MySQL with Lokahi.
I have ported the tables.sql, procedures.sql, views.sql files to MySQL
5.1, but i cannot port the functions because they use a REF CURSOR as
return value, and this is only supported by Oracle AFAIK (i guess i can
deal with the types defined in packages.sql, these are not supported
obviously in MySQL but this can be tackled at a higher level (java code)).
So i have began to dig into the code of Lokahi and i see some hardcoded
references to Oracle in org.apache.lokahi.core.controller.AdminBean.
Before hacking this file (and the other ones which will exhibit the
problem) so it doesn't use a sql function which return cursors, i would
like to know what are the plans regarding the support of other dbs than
Oracle (well there is a support for Derby that i haven't tested but i
focus on MySQL and would like to help develop to support it -> i'm
wondering if the derby support is functional even with the references to
OracleTypes in Adminbean?), because perhaps you have already defined
something. For instance, are the classes
org.apache.lokahi.core.common.database.[Derby|Oracle]Broker designed to
hide the databases particularisms ? Are you planning to use an existing
ORM framework in the future so you will not have to support yourself the
db part for each server ? (My personal preference go to OJB, but any
framework would be interesting (hibernate...)) If this is the case have
you a preliminar design ?
So i would appreciate any answer/hint/link to documentation/..., and i
apologize in advance if the post is too long,
Thanks in advance and have a good day,
PS: Is the JIRA functional ? I haven't investigated but when i click on
the link on the lokahi website JIRA say "Project not found".
--
Cordialement,
Ludo - http://www.ubik-products.com
---
"L'amour pour principe et l'ordre pour base; le progres pour but" (A.Comte)