Hi,

On Dec 20, 2007 3:40 PM, Stefan Guggisberg <[EMAIL PROTECTED]> wrote:
> here's a couple random thoughts/comments:
>
> - J2EE infrastructure/environment should not be mandated;
>   it should still be possible to use jackrabbit (with jdbc based
>   persistence) standalone.

+1 I think commons-dbcp will help us here. The following code snippet
will buy you a connection pool with our existing configuration
information:

    DriverAdapterCPDS cpds = new DriverAdapterCPDS();
    cpds.setDriver(...);
    cpds.setUrl(...);
    cpds.setUser(...);
    cpds.setPassword(...);

    SharedPoolDataSource datasource = new SharedPoolDataSource();
    datasource.setConnectionPoolDataSource(cpds);

> - we'll have to make sure that connections from an external pool
>   are not enlisted in external/distributed transactions.

True. This will likely require quite a bit of documenting. Is there
perhaps some way we could ask a DataSource or a Connection whether it
participates in a distributed transaction?

> - we'll have to make sure that connections from an external pool
>   have the correct tx isolation level (read committed)

We might want to add a Connection.getTransactionIsolation() check to
be performed at least during persistence manager initialization.

> - all write operations associated with a specific changelog
>   must be done through the *same* connection.

Yes. That'll probably require most refactoring of existing work, as
AbstractBundlePersistenceManager.store() currently divides the work to
separate methods with no shared state apart from the persistence
manager instance itself.

BR,

Jukka Zitting

Reply via email to