Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session should be logged out in finally block. #241

Open
ramcharankavvamp opened this issue Apr 29, 2024 · 0 comments
Open

Session should be logged out in finally block. #241

ramcharankavvamp opened this issue Apr 29, 2024 · 0 comments

Comments

@ramcharankavvamp
Copy link

ramcharankavvamp commented Apr 29, 2024

We defined and signedout session in finally block from EventListener Activate method, But it is always reporting from cloud manger Session should be logged out in finally block.
@activate
public void activate(ComponentContext context) throws CustomActivationException {
Session adminSession=null;

 try {
	 adminSession = repository.loginService("xyz",null);
     observationManager=adminSession.getWorkspace().getObservationManager();
     observationManager.addEventListener(
      this, //handler
      Event.PROPERTY_ADDED | Event.PROPERTY_CHANGED, //binary combination of event types
      "xyz/xyz/xyz", //path
      true, //is Deep?
      null, //uuids filter
      null, //nodetypes filter
      false);
       
 } catch (RepositoryException e){
  logger.error("unable to register session{}",e);
 } finally {    	 
              if(adminSession !=null){
		 adminSession.logout();
		 adminSession = null;
      }
 }
}

Please help for logout the adminSession in finally block from cloudmanager report.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant