Should I close the session before closing the resource resolver

前端 未结 1 968
猫巷女王i
猫巷女王i 2021-01-22 03:06

I have simple service, lets use resourceResolver and session for some logic:

@Component(immediate = true)
@Service(value = ServiceInterface.class)
public class S         


        
相关标签:
1条回答
  • 2021-01-22 03:52

    The session will be automatically closed, when you close the ResourceResolver, so resourceResolver.close() is enough. You can dig into the code to find the place where this happens. If you get a session repo.loginAdministrative(), you should logout the session at the end, but this is not the recommended way to obtain a jcr session.

    0 讨论(0)
提交回复
热议问题