[ 
https://issues.apache.org/jira/browse/SLING-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574403#action_12574403
 ] 

Felix Meschberger commented on SLING-132:
-----------------------------------------

Possible approach to this issue:

(1) The Repository component (e.g. SlingServerRepository) is not declared to be 
a service. That is, the component instance is not registered as a service the 
Declarative Services runtime. Instead the component registers itself as a 
service when the respository becomes available and unregisters as a service 
when the repository becomes unavailable.

(2) A background thread is created which continuosly polls the repository for 
being available: If the repository becomes available, the component is 
registered as a service. If the repository becomes unavailable, the service 
unregistered

(3) The background thread is started when the component is activated and 
stopped when the component is deactivated. Only the background thread manages 
service registration and unregistration. On thread stop, the service is of 
course unregistered should it be registered at that point in time.

(3) If possible, all sessions still alive when the service is unregistered, 
will be logged out.

This mechanism must be available to both the jackrabbit-client module and the 
jackrabbit-server module acting as a client.

> Auto-reconnect to the JCR Repository if it is not found or lost
> ---------------------------------------------------------------
>
>                 Key: SLING-132
>                 URL: https://issues.apache.org/jira/browse/SLING-132
>             Project: Sling
>          Issue Type: Improvement
>          Components: Repository
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> Affects the jackrabbit-client bundle accessing a "remote" repository. 
> Currently the respective component just tries to access the repository and 
> gives up, if it fails.
> This should be enhanced to:
>    * retry in configurable intervals whether the repository is now available
>    * find out that a repository may have gone and try to reconnect in the 
> same configurable intervals
> Care must be taken in the second case to drop (close ?) any sessions still 
> connected with the old disappeared repository.

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