[ 
https://issues.apache.org/jira/browse/LENS-853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15181479#comment-15181479
 ] 

Hudson commented on LENS-853:
-----------------------------

SUCCESS: Integrated in Lens-Commit #1203 (See 
[https://builds.apache.org/job/Lens-Commit/1203/])
LENS-853 : Quit shell should close session all times (amareshwari: rev 
b7773d6c74cc323be10c0f416f4ec93d8711fe00)
* lens-server/src/main/java/org/apache/lens/server/session/SessionResource.java
* lens-cli/src/test/java/org/apache/lens/cli/TestLensConnectionCliCommands.java
* lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java
* lens-cli/src/test/java/org/apache/lens/cli/TestLensQueryCommands.java


> Quitting shell(quitshell()) is not closing session some times.
> --------------------------------------------------------------
>
>                 Key: LENS-853
>                 URL: https://issues.apache.org/jira/browse/LENS-853
>             Project: Apache Lens
>          Issue Type: Bug
>          Components: client
>            Reporter: Raju Bairishetti
>            Assignee: Raju Bairishetti
>              Labels: newbie
>             Fix For: 2.6
>
>         Attachments: LENS-853.patch, LENS-853_01.patch
>
>
> Quitting session through programmatically is not closing the session some 
> times. 
> First it checks whether connection to server is active or not to close the 
> session. It is depending on isConnectionActive variable to check the 
> connection is active or not. Right now we are setting isConnectionActive to 
> true only  if user calls  getClient(). isConnectionActive should be set to 
> true when user calls setClient(client). 
> code snippets:
> ----------------
> {code}
>   public LensClient getClient() {
>     if (lensClient == null) {
>       setClient(getClientWrapper().getClient());
>       isConnectionActive = true;
>     }
>     return lensClient;
>   }
> {code}
> {code}
> protected static synchronized void closeClientConnection() {
>     if (isConnectionActive) {
>       log.debug("Request for stopping lens cli received");
>       getClientWrapper().getClient().closeConnection();
>       isConnectionActive = false;
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to