[ http://issues.apache.org/jira/browse/JCR-313?page=all ]

Jukka Zitting updated JCR-313:
------------------------------

    Attachment: dbpm-jndi.patch

Attached a minimal and untested patch for adding support for DataSources bound 
in JNDI. It allows one to optionally configure a JNDI path as the 
dataSourceLocation configuration parameter instead of configuring the 
traditional driver/url/user/password parameters. If the dataSourceLocation 
parameter is given, then a JNDI lookup is made to get the DataSource and a 
Connection is acquired using DataSource.getConnection(). Otherwise the 
traditional configuration parameters are used.

Would this be a good enough way to resolve this issue, or should we make a 
general DatabasePersistenceManager base class that contains most of the current 
SimpleDbPersistenceManager functionality and use separate 
SimpleDbPersistenceManager and JndiDbPersistenceManager subclasses for handling 
the different configuration mechanisms?

> 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

Reply via email to