jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MARTINEZ Antonio" <Antonio.Marti...@alcatel-lucent.com>
Subject RE: Using a proxy DB Connector to several MySql DBs
Date Thu, 28 Aug 2008 22:48:48 GMT
Hi Alex,

Thanks for the response. Indeed that works 
    <param name="schema" value="mysql" />

I just was testing it and is fine.



Thanks,
Antonio

-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@day.com] 
Sent: Thursday, August 28, 2008 2:41 PM
To: users@jackrabbit.apache.org
Subject: Re: Using a proxy DB Connector to several MySql DBs

>From the top of my head, adding

<param name="schema" value="mysql.ddl" />

should do the trick.

Regards,
Alex

On Thu, Aug 28, 2008 at 7:29 PM, MARTINEZ Antonio
<Antonio.Martinez@alcatel-lucent.com> wrote:
> Hello,
>
> In my deployment environment I need to use a proxy DB-connector to 
> MySql. In our case we have 2 MySql databases (they are kept in sync), 
> and this connector determines which DB is active and forwards commands

> to it.
>
> This is the way I use it (note that in url we actually use two)
>
>  <Cluster id="SOME_ID">
>    <Journal
class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>      <param name="revision" value="${rep.home}/revision.log" />
>      <param name="driver"
> value="com.alu.cnm.infrastructure.hadbconnector.HaDriver" />
>      <param name="url"
> value="hapool:localhost:3307;sometherurl:3307;emlplatform?useUnicode=t
> ru
> e&characterEncoding=UTF-8" />
>      <param name="user" value="root" />
>      <param name="password" value="mysql" />
>    </Journal>
>  </Cluster>
>
>
> The problem I'm facing (I guess) is that JackRabbit does not know this

> driver is just a MySql proxy, and therefore writes code for other DB 
> instead of not MySql (see the "falling back to default.dll", which I 
> do not seen when directly using MySql)
>
>     2008-09-22 17:16:16,317 INFO
> [org.apache.jackrabbit.core.RepositoryImpl] Starting repository..."
>     2008-09-22 17:16:18,048 INFO
> [org.apache.jackrabbit.core.nodetype.NodeTypeRegistry] no custom node 
> type definitions found
>     2008-09-22 17:16:18,163 INFO
> [org.apache.jackrabbit.core.journal.DatabaseJournal] No 
> schema-specific DDL found: 'localhost.ddl', falling back to
'default.ddl'.
>     2008-09-22 17:16:18,192 ERROR
> [org.apache.jackrabbit.core.RepositoryImpl] failed to start
Repository:
> Unable to create connection.
>
> Monitoring MySql with dtrace
>   - When directly using MySql driver I see
>          create table JOURNAL (REVISION_ID BIGINT NOT NULL, JOURNAL_ID

> varchar(255), PRODUCER_ID varchar(255), REVISION_DATA longblob)
>
>   - Using the proxy DB-connector I see other syntax, which throws a 
> MySql syntax error (varbinary is NOT correct for MySql)
>          create table JOURNAL (REVISION_ID BIGINT NOT NULL, JOURNAL_ID

> varchar(255), PRODUCER_ID varchar(255), REVISION_DATA varbinary)
>
>
> So I have 2 questions:
>  1) Is there a way to make JackRabbit believe that for this proxy 
> DB-connector JackRabbit needs to write MySql code ? Hopefully only 
> modifying repository.xml
>
>  2) In case 1) is not possible, does Jackrabbit support 2 databases, 
> i.e, could I somehow specify two IPs in the url parameter? Will 
> JackRabbit be able to change to the second when there are problems 
> with the first one? and back?
>
>
> Thanks,
> Antonio
>
>
>
>
>



--
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message