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

Martin Perez commented on JCR-313:
----------------------------------

- It makes all the sense to move the JNDI handling to a base class, as it could 
be used by all the specializations.

- Sure, even more: 3) Without closing connections it would be very easy to 
exhaust the application server connection pool, and I don't think the server 
admin would like this to happen when other applications could share the same 
pool.

- I do not understand Marcel's 3 point. Also, I do not know why connections 
must be returned. I have been looking at the code and it is cleat that prepared 
statements cannot be used on that way, and also, the connection cannot be 
keeped. In traditional J2EE applications you should obtain a connection and 
close it (and by consequende the pstmt) on the same method. Why can this be 
done? 

Martin


> 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