jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Aktualisiert: (JCR-396) RMI published Repository using the jcr-rmi library gets lots over time
Date Wed, 12 Apr 2006 13:26:20 GMT
     [ 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 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:
For more information on JIRA, see:

View raw message