ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45740] New: SSHBase to be able to use external Session instead everytime to create new one
Date Thu, 04 Sep 2008 12:34:56 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45740

           Summary: SSHBase to be able to use external Session instead
                    everytime to create new one
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Optional Tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: miro@space-comm.com


I notice that SSHBase which is base class for ssh copy, execute, sft, etc.
creates Session everytime instead to use some existing ssh session. This can be
corrected very easy with adding 2nd constructor with one Session parameter and
get/set session like that:

   public SSHBase(Session session)
   {
      this.session = session;
   }

   public Session getSession()
   {
      if(session == null || !session.isConnected())
      {
         session = openSession();
      }

      return session;
   }

   public void setSession(Session session)
   {
      this.session = session;
   }


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message