[ 
https://issues.apache.org/jira/browse/CMIS-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Hubick updated CMIS-103:
------------------------------

    Attachment: chemistry_connection_thread_safety.patch

Ok, much smaller updated patch attached.

This just drops the per Connector HttpClient and un-comments the 
APPContentManager code that was already there to use the 
MultiThreadedHttpConnectionManager.  My HttpClient knowledge is a little light 
here, can someone say why it was commented out?  It seems to be working for me, 
at first glance.

This patch still adds synchronization to APPRepository.loadTypes(), which I 
think is needed.  I would consider patching SimpleTypeManager to use thread 
safe collection classes internally as well.

While I was in there, I sets the default login Credentials (not just the 
provider) on the HttpState object, to remove all the "WARNING: Preemptive 
authentication requested but no default credentials available" output I get.


> APPConnection Thread Safety
> ---------------------------
>
>                 Key: CMIS-103
>                 URL: https://issues.apache.org/jira/browse/CMIS-103
>             Project: Chemistry
>          Issue Type: Bug
>          Components: atompub
>            Reporter: Chris Hubick
>         Attachments: chemistry_connection_thread_safety.patch
>
>
> Hi.
> It would be really great if APPConnection were thread safe, at least for 
> reading.
> When my server application starts up, I would like to create an instance of 
> APPContentManager, login, etc, and then get a reference to the default 
> Repository object.  My application would then service client requests, each 
> running in a separate Thread which calls Repository.getConnection() to get 
> it's own Connection (APPConnection) for reading from the backend Repository.
> A persistent and shared Repository means that each of many service Thread's 
> doesn't require a separate HTTP request to download the CMIS Service 
> Document, and then overhead due to parsing, type management, etc.
> From a first glance, the main problem is that the HttpClient instance is 
> shared among all APPContentManager clients, and APPRespository doesn't 
> synchronize calls to loadTypes().

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