You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2007/12/11 13:59:43 UTC

[jira] Created: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

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: microsling
            Reporter: Bertrand Delacretaz
            Priority: Minor


Setting the component to "microsling" as I haven't checked how that's handled in Sling.

It'd be useful to try to reconnect to the Repository from time to time, if it was not found or lost.

At startup, for example, if the Repository is provided by another webapp it might not be immediately available, but might come up after a few seconds.

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


[jira] Commented: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-132:
------------------------------------

    Component/s:     (was: Resource)
                 Repository

fix component

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


[jira] Resolved: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-132.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
         Assignee: Felix Meschberger

I consider this issue fixed after the recent checkins and minor fix due to SLING-310.

Please close if it fixes your issue. Thanks.

> 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
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> 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.


[jira] Commented: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574405#action_12574405 ] 

Bertrand Delacretaz commented on SLING-132:
-------------------------------------------

+1 to the suggested solution. 

Would this handle multiple Repositories? I don't think we need this now, but we might want to keep this in mind.

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


[jira] Commented: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575313#action_12575313 ] 

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

Refactored AbstractSlingRepository implementing a background thread which constantly checks for the availability of the configured repository accessing or re-accessing as required in Rev. 633823.

Adapted jackrabbit-client in Rev. 633824 and jackrabbit-server in Rev. 633825.

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


[jira] Commented: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574411#action_12574411 ] 

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

multiple repositories are handled by multiple component instances because each repository is handled by a separate configuration object which in turn causes the creation of a component per configuration. So, yes, this concept is also supporting multiple repositories.

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


[jira] Updated: (SLING-132) Auto-reconnect to the JCR Repository if it is not found or lost

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-132:
------------------------------------

    Component/s:     (was: microsling)
                 Resource
    Description: 
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.

  was:
Setting the component to "microsling" as I haven't checked how that's handled in Sling.

It'd be useful to try to reconnect to the Repository from time to time, if it was not found or lost.

At startup, for example, if the Repository is provided by another webapp it might not be immediately available, but might come up after a few seconds.


> 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: Resource
>            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.