[ 
https://issues.apache.org/jira/browse/JCR-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623452#action_12623452
 ] 

Matej Knopp commented on JCR-1456:
----------------------------------

> What about doing that for DbDataStore first? The patch would be much smaller. 

Well, the file system is also instantiated per workspace so I believe 
connection pooling makes sense there. But it can be excluded from the patch, 
that shouldn't be a big issue.
Same goes for DataStore. But while you can live without Db file system, 
DbDateStore is more or less necessary for clustered environments and the lack 
of connection pooling can be a serious issue there.

> That sounds too complicated, too tricky, and too slow for me. For 
> store(ChangeLog), why not simply pass the connection object to the nested 
> calls? 

Because the nested calls are invoked from BundleDbPersistenceManager which 
doesn't know about database connection. 
 
It's really not complicated at all. There is one class 
(ThreadLocalConnectionProviderAdapter) that makes sure that getConnection() 
returns same connection for "nested" calls. 
Also, could you please be more specific about what exactly sounds too slow 
about this?

> Just to make sure: You mean automated tests, right? Manual tests is a 
> maintenance problem. 
Well, all unit tests that work with "vanilla" jackrabbit also work after the 
patch is applied. However the patch hasn't been heavily tested in "real world" 
environment or with different database backends.

> Database connection pooling
> ---------------------------
>
>                 Key: JCR-1456
>                 URL: https://issues.apache.org/jira/browse/JCR-1456
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core
>            Reporter: Jukka Zitting
>             Fix For: 1.5
>
>         Attachments: patch-1456-1.txt, patch-1456-2.txt
>
>
> Jackrabbit should use database connection pools instead of a single 
> connection per persistence manager, cluster journal, or database data store.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to