jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From malsi <islam.el-sa...@epfl.ch>
Subject Re: CacheManager slowing performance
Date Fri, 23 Nov 2007 08:40:16 GMT

Sorry here is the code for my getSession

    public Session getSession(Systemuser user) throws RepositoryException {
        if (user != null ) {
            Session s = repository.login(getCredentials(user));
            try {
               
s.getRootNode().getNode(site.getSiteKey()+"/j:users/"+user.getUsername());
            } catch (PathNotFoundException e) {
                Node users =
getSystemSession().getRootNode().getNode(site.getSiteKey()+"/j:users");
                Node userFolder = users.addNode(user.getUsername(),
Constants.FOLDER);
                Node privateFolder = userFolder.addNode("private",
Constants.FOLDER);
                users.save();
            } catch (RepositoryException e) {
            }
            return s;
        } else {
            return repo.login(getGuestCredentials());
        }
    }


So it does not do any particular stuff except give the user  what he can or
cannot do in the repository.
getGuestCredentials() does nothing but return the user itself (for now)


Thank for your help, I apreciate it :)




Thomas Mueller-6 wrote:
> 
> Hi,
> 
>> I have an error message
>> javax.jcr.RepositoryException: this session has been closed
> 
> After calling Session.logout(), you can not use this session object
> any more. Maybe you need to call jcrStoreService.removeSession(user)
> or something like that.
> 
>> session =jcrStoreService.getSession(user);
> 
> What does this jcrStoreService do? Could you provide the source code
> for this class?
> 
> Thomas
> 
> 
> 
> 
> 
> 
> 
> On Nov 15, 2007 11:44 AM, malsi <islam.el-sayed@epfl.ch> wrote:
>>
>> The problem is that as I have multiple users that connect to the
>> repository
>> at the same time and I have to have a session for each one of them and
>> sometimes the session preforms multiple tasks on the node (ading and
>> removing) so I logout()  only when my user disconnects from the system.
>>
>>
>> If for instance , at every acces to the repository, I do
>>
>> session =jcrStoreService.getSession(user);
>>
>> /* do some stuff here */
>>
>> session.logout();
>>
>> and then I try to reconnect with this same user with
>>
>> session =jcrStoreService.getSession(user);
>>
>> I have an error message
>> javax.jcr.RepositoryException: this session has been closed
>>
>>
>>
>> Thomas Mueller-6 wrote:
>> >
>> > Hi,
>> >
>> > Did you open many sessions and not close them? This could be the
>> > reason for the performance problem.
>> >
>> > Thanks,
>> > Thomas
>> >
>> > On Nov 15, 2007 9:58 AM, malsi <islam.el-sayed@epfl.ch> wrote:
>> >>
>> >>
>> >> I have a which is that from time to time  the class
>> >> org.apache.jackrabbit.core.state.CacheManager gets fired and this
>> slows
>> >> performance very much. . I know that CacheManager  manages the size of
>> >> the
>> >> caches used in Jackrabbit (which has to be dynamic to increase
>> >> performance
>> >> and memory usage) but is there another way to avoid having this
>> >> CacheManager
>> >> class getting fired all the time i.e (schedule it).
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/CacheManager-slowing-performance-tf4810570.html#a13763908
>> >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/CacheManager-slowing-performance-tf4810570.html#a13765115
>>
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/CacheManager-slowing-performance-tf4810570.html#a13908647
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message