[ 
https://issues.apache.org/jira/browse/CMIS-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725977#action_12725977
 ] 

Dominique Pfister commented on CMIS-20:
---------------------------------------

Hi Michael,

Thanks for opening an issue and providing a patch! Here my comments:

- After having applied your patch, I get a syntax error in 
JcrRepository.getTypes():

144:            result.add(new JcrType(,
145:                    BaseType.FOLDER));
            
Did you have a look whether this code is still necessary at all?

- With your patch, a single session will be used for all connections returned 
by JcrRepository.getConnection. Since methods on javax.jcr.Session are not 
mandated to be thread-safe, I'd prefer to return a new javax.jcr.Session on 
every call to getConnection(). Do you think you could rewrite your patch to 
save the SimpleCredentials only in JcrRepository, and create a new 
javax.jcr.Session when needed?

- About source code formatting: in chemistry we use spaces instead of tabs for 
indentation. Can you replace them in the patch you provide?

Kind regards
Dominique

> JCR Implementation: open session at constructor
> -----------------------------------------------
>
>                 Key: CMIS-20
>                 URL: https://issues.apache.org/jira/browse/CMIS-20
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: jcr
>            Reporter: Michael Mertins
>         Attachments: patch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> The JcrRepository.java could be improved by passing session credentials and 
> opening the session in the constructor.

-- 
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