You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2006/04/12 15:10:21 UTC

[jira] Erstellt: (JCR-396) RMI published Repository using the jcr-rmi library gets lots over time

RMI published Repository using the jcr-rmi library gets lots over time
----------------------------------------------------------------------

         Key: JCR-396
         URL: http://issues.apache.org/jira/browse/JCR-396
     Project: Jackrabbit
        Type: Bug

  Components: rmi  
    Versions: 1.0    
 Environment: Jackrabbit Rev. 393410 WebApp
    Reporter: Felix Meschberger
 Assigned to: Felix Meschberger 
     Fix For: 1.1


The jcr-server/webapp project contains a servlet - RepositoryStartupServlet - which may be used in a web app to start a repository and optionally register the repository with JNDI and RMI. To register the repository with JNDI, the jcr-rmi library is used to create a Remote repository instance, which is registered with the RMI registry. Inside the RMI implementation mechanisms based on stub classes created by the RMI compiler are created to make the remote repository available remotely. This includes creating a object table to map remote references to local objects. This table stores references to the local object as weak references to support distributed garbage collection.

Over time, it may now be that this remote repository instance is actually collected and the object table cannot access it anymore thus preventing the repository from being accessed remotely. To prevent this from happening, the RepositoryStartupServlet must keep a strong reference to the remote repository and drop this reference when the servlet is destroyed and the repository unregistered.

*NOTE:* This is an issue to all long running applications which publish repository instances over RMI using the jcr-rmi library.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Geschlossen: (JCR-396) RMI published Repository using the jcr-rmi library gets lost over time

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-396?page=all ]
     
Felix Meschberger closed JCR-396:
---------------------------------


> RMI published Repository using the jcr-rmi library gets lost over time
> ----------------------------------------------------------------------
>
>          Key: JCR-396
>          URL: http://issues.apache.org/jira/browse/JCR-396
>      Project: Jackrabbit
>         Type: Bug

>   Components: rmi
>     Versions: 1.0
>  Environment: Jackrabbit Rev. 393410 WebApp
>     Reporter: Felix Meschberger
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: RepositoryStartupServlet_patch_fm_20060412.diff
>
> The jcr-server/webapp project contains a servlet - RepositoryStartupServlet - which may be used in a web app to start a repository and optionally register the repository with JNDI and RMI. To register the repository with JNDI, the jcr-rmi library is used to create a Remote repository instance, which is registered with the RMI registry. Inside the RMI implementation mechanisms based on stub classes created by the RMI compiler are created to make the remote repository available remotely. This includes creating a object table to map remote references to local objects. This table stores references to the local object as weak references to support distributed garbage collection.
> Over time, it may now be that this remote repository instance is actually collected and the object table cannot access it anymore thus preventing the repository from being accessed remotely. To prevent this from happening, the RepositoryStartupServlet must keep a strong reference to the remote repository and drop this reference when the servlet is destroyed and the repository unregistered.
> *NOTE:* This is an issue to all long running applications which publish repository instances over RMI using the jcr-rmi library.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JCR-396) RMI published Repository using the jcr-rmi library gets lost over time

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-396?page=all ]

Jukka Zitting updated JCR-396:
------------------------------

    Fix Version: 1.0.1
                     (was: 1.1)

Merged for 1.0.1 in revision 409543.

> RMI published Repository using the jcr-rmi library gets lost over time
> ----------------------------------------------------------------------
>
>          Key: JCR-396
>          URL: http://issues.apache.org/jira/browse/JCR-396
>      Project: Jackrabbit
>         Type: Bug

>   Components: rmi
>     Versions: 1.0
>  Environment: Jackrabbit Rev. 393410 WebApp
>     Reporter: Felix Meschberger
>     Assignee: Felix Meschberger
>      Fix For: 1.0.1
>  Attachments: RepositoryStartupServlet_patch_fm_20060412.diff
>
> The jcr-server/webapp project contains a servlet - RepositoryStartupServlet - which may be used in a web app to start a repository and optionally register the repository with JNDI and RMI. To register the repository with JNDI, the jcr-rmi library is used to create a Remote repository instance, which is registered with the RMI registry. Inside the RMI implementation mechanisms based on stub classes created by the RMI compiler are created to make the remote repository available remotely. This includes creating a object table to map remote references to local objects. This table stores references to the local object as weak references to support distributed garbage collection.
> Over time, it may now be that this remote repository instance is actually collected and the object table cannot access it anymore thus preventing the repository from being accessed remotely. To prevent this from happening, the RepositoryStartupServlet must keep a strong reference to the remote repository and drop this reference when the servlet is destroyed and the repository unregistered.
> *NOTE:* This is an issue to all long running applications which publish repository instances over RMI using the jcr-rmi library.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Aktualisiert: (JCR-396) RMI published Repository using the jcr-rmi library gets lots over time

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-396?page=all ]

Felix Meschberger updated JCR-396:
----------------------------------

    Attachment: RepositoryStartupServlet_patch_fm_20060412.diff

There are basically two ways to keep the strong reference: (1) keep it transparently by forcing the RMI internals to also keep a strong reference by "pinning" the internally used WeakRef or (2) make it explicit in the RepositoryStartupServlet. The first solution has the advantage to apply for all users but has the big disadvantage that the remote repository may only go away by explicitly unexporting it. The second solution on the other hand places additional burdons on the user of the remote repository.

Therefore the attached patch "fixes" the RepositoryStartupServlet by keeping a strong reference to the remote repository and releases that reference when unregistering the repository from RMI.

> RMI published Repository using the jcr-rmi library gets lots over time
> ----------------------------------------------------------------------
>
>          Key: JCR-396
>          URL: http://issues.apache.org/jira/browse/JCR-396
>      Project: Jackrabbit
>         Type: Bug

>   Components: rmi
>     Versions: 1.0
>  Environment: Jackrabbit Rev. 393410 WebApp
>     Reporter: Felix Meschberger
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: RepositoryStartupServlet_patch_fm_20060412.diff
>
> The jcr-server/webapp project contains a servlet - RepositoryStartupServlet - which may be used in a web app to start a repository and optionally register the repository with JNDI and RMI. To register the repository with JNDI, the jcr-rmi library is used to create a Remote repository instance, which is registered with the RMI registry. Inside the RMI implementation mechanisms based on stub classes created by the RMI compiler are created to make the remote repository available remotely. This includes creating a object table to map remote references to local objects. This table stores references to the local object as weak references to support distributed garbage collection.
> Over time, it may now be that this remote repository instance is actually collected and the object table cannot access it anymore thus preventing the repository from being accessed remotely. To prevent this from happening, the RepositoryStartupServlet must keep a strong reference to the remote repository and drop this reference when the servlet is destroyed and the repository unregistered.
> *NOTE:* This is an issue to all long running applications which publish repository instances over RMI using the jcr-rmi library.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Erledigt: (JCR-396) RMI published Repository using the jcr-rmi library gets lost over time

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-396?page=all ]
     
Felix Meschberger resolved JCR-396:
-----------------------------------

    Resolution: Fixed

Fixed applying the patch in Rev. 393456

> RMI published Repository using the jcr-rmi library gets lost over time
> ----------------------------------------------------------------------
>
>          Key: JCR-396
>          URL: http://issues.apache.org/jira/browse/JCR-396
>      Project: Jackrabbit
>         Type: Bug

>   Components: rmi
>     Versions: 1.0
>  Environment: Jackrabbit Rev. 393410 WebApp
>     Reporter: Felix Meschberger
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: RepositoryStartupServlet_patch_fm_20060412.diff
>
> The jcr-server/webapp project contains a servlet - RepositoryStartupServlet - which may be used in a web app to start a repository and optionally register the repository with JNDI and RMI. To register the repository with JNDI, the jcr-rmi library is used to create a Remote repository instance, which is registered with the RMI registry. Inside the RMI implementation mechanisms based on stub classes created by the RMI compiler are created to make the remote repository available remotely. This includes creating a object table to map remote references to local objects. This table stores references to the local object as weak references to support distributed garbage collection.
> Over time, it may now be that this remote repository instance is actually collected and the object table cannot access it anymore thus preventing the repository from being accessed remotely. To prevent this from happening, the RepositoryStartupServlet must keep a strong reference to the remote repository and drop this reference when the servlet is destroyed and the repository unregistered.
> *NOTE:* This is an issue to all long running applications which publish repository instances over RMI using the jcr-rmi library.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Aktualisiert: (JCR-396) RMI published Repository using the jcr-rmi library gets lost over time

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-396?page=all ]

Felix Meschberger updated JCR-396:
----------------------------------

    Summary: RMI published Repository using the jcr-rmi library gets lost over time  (was: RMI published Repository using the jcr-rmi library gets lots over time)

> RMI published Repository using the jcr-rmi library gets lost over time
> ----------------------------------------------------------------------
>
>          Key: JCR-396
>          URL: http://issues.apache.org/jira/browse/JCR-396
>      Project: Jackrabbit
>         Type: Bug

>   Components: rmi
>     Versions: 1.0
>  Environment: Jackrabbit Rev. 393410 WebApp
>     Reporter: Felix Meschberger
>     Assignee: Felix Meschberger
>      Fix For: 1.1
>  Attachments: RepositoryStartupServlet_patch_fm_20060412.diff
>
> The jcr-server/webapp project contains a servlet - RepositoryStartupServlet - which may be used in a web app to start a repository and optionally register the repository with JNDI and RMI. To register the repository with JNDI, the jcr-rmi library is used to create a Remote repository instance, which is registered with the RMI registry. Inside the RMI implementation mechanisms based on stub classes created by the RMI compiler are created to make the remote repository available remotely. This includes creating a object table to map remote references to local objects. This table stores references to the local object as weak references to support distributed garbage collection.
> Over time, it may now be that this remote repository instance is actually collected and the object table cannot access it anymore thus preventing the repository from being accessed remotely. To prevent this from happening, the RepositoryStartupServlet must keep a strong reference to the remote repository and drop this reference when the servlet is destroyed and the repository unregistered.
> *NOTE:* This is an issue to all long running applications which publish repository instances over RMI using the jcr-rmi library.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira