jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-313) Allow to configure DB persistence managers through JDNI
Date Thu, 16 Feb 2006 10:20:01 GMT
    [ http://issues.apache.org/jira/browse/JCR-313?page=comments#action_12366615 ] 

Marcel Reutegger commented on JCR-313:
--------------------------------------

Thanks Jukka for taking the initiative on this issue. If everyone else is ok with implementing
JNDI support in the SimpleDbPersistenceManager that's also fine with me. But a have a few
concerns that I'd like to express:

- I share Brians opinion to create a separate implementation that is JNDI enabled and move
the common logic into a base class. The main reason here is to keep the existing implementation
simple.

- The implementation that uses JNDI should not keep the connection that it gets from the datasource.
There are several reasons why this is not desirable: 1) there might be a connection timeout
in the datasource that will revoke the connection given to the PM, 2) if the connection is
broken due to a network failure, the PM would have to recover from that failure. But this
is exactly the responsibility of a DataSource.
One of the concerns with the current simple implementation is that it does not make use of
a pool (DataSource), the JNDI enabled PM should address this.

- With the previous point in mind, a JNDI enabled PM will not be able to use prepared statements
over multiple store() operations, because it should return the connection. This will probably
have a significant impact on the implementation of the PM. So, I'm not sure how much of the
current Simple DB PM can acutally be reused.


> Allow to configure DB persistence managers through JDNI
> -------------------------------------------------------
>
>          Key: JCR-313
>          URL: http://issues.apache.org/jira/browse/JCR-313
>      Project: Jackrabbit
>         Type: Improvement
>     Versions: 0.9
>     Reporter: Martin Perez
>     Assignee: Jukka Zitting
>      Fix For: 1.0
>  Attachments: dbpm-jndi.patch
>
> Currently, DB persistence managers have hardcoded urls. Even more, they will use a single
connection with the drawbacks that this have regarding concurrency, performance and transactionality.

> It would be fairly better to allow to configure DB persistence managers through JDNI
references to DataSource. So giving responsability to application server. Concurrency, performance
and transactionability will be highly boosted with this approach. 
> This could be a sample configuration :
> <PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>        <param name="dataSource" value="jdbc/JackrabbitDS"/>
>         
>        .... think also about a way to pass params to data source, it should be simple
....
>        <param name="schema" value="mysql"/>
>        <param name="schemaObjectPrefix" value="${
> wsp.name}_"/>
>        <param name="externalBLOBs" value="false"/>
>    </PersistenceManager>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message