diff --git a/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBCommands.java b/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBCommands.java index 6c81d0fbded..3a55d446b9f 100644 --- a/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBCommands.java +++ b/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBCommands.java @@ -19,9 +19,10 @@ import org.apache.openejb.server.cli.CliRunnable; import org.apache.sshd.server.Environment; import org.apache.sshd.server.ExitCallback; -import org.apache.sshd.server.SessionAware; +import org.apache.sshd.server.channel.ChannelSession; import org.apache.sshd.server.command.Command; import org.apache.sshd.server.session.ServerSession; +import org.apache.sshd.server.session.ServerSessionAware; import javax.security.auth.Subject; import javax.security.auth.login.LoginContext; @@ -31,7 +32,7 @@ import java.io.OutputStream; import java.security.PrivilegedAction; -public class OpenEJBCommands extends CliRunnable implements Command, Runnable, SessionAware { +public class OpenEJBCommands extends CliRunnable implements Command, Runnable, ServerSessionAware { private ExitCallback cbk; private LoginContext loginContext; @@ -64,11 +65,6 @@ public void setExitCallback(ExitCallback callback) { cbk = callback; } - @Override - public void start(Environment env) throws IOException { - start(); - } - @Override public void run() { if (loginContext == null) { @@ -102,5 +98,15 @@ public void setSession(final ServerSession session) { setUsername(username); loginContext = session.getAttribute(OpenEJBJaasPasswordAuthenticator.LOGIN_CONTEXT_KEY); } + + @Override + public void start(ChannelSession channelSession, Environment environment) throws IOException { + start(); + } + + @Override + public void destroy(ChannelSession channelSession) throws Exception { + destroy(); + } }