Hi, I'm experimenting with http://mina.apache.org/ftpserver I have written a small java class that gets used by the ftp server, and am trying to transpose it to clojure, but unsuccessfully until now....
The class generated with clojure is detected and used by the server, but the code of the method implemented is not run, and even worse, the ftp server isn't functional anymore (though I don't see any exception raised). Does anyone have an idea about what I'm doing wrong? Thanks Raphaƫl Here's the java code: package com.raphinou; import java.io.IOException; import org.apache.ftpserver.*; import org.apache.ftpserver.ftplet.*; public class Ftplet extends DefaultFtplet { public FtpletResult onLogin(FtpSession session, FtpRequest request) throws FtpException, IOException { java.util.logging.Logger logger= java.util.logging.Logger.getLogger("com.raphinou"); logger.addHandler( new java.util.logging.FileHandler("/tmp/ ftp.log")); logger.severe("Logging in!!"); return FtpletResult.DEFAULT; } } and here's the clojure code: (ns com.raphinou.ftplet (:gen-class :name com.raphinou.Ftplet :extends org.apache.ftpserver.ftplet.DefaultFtplet) (:import [org.apache.ftpserver.ftplet DefaultFtpReply FtpletResult])) (def logger (java.util.logging.Logger/getLogger "com.raphinou")) (.addHandler logger (java.util.logging.FileHandler. "/tmp/ftp.log")) (defn -onLogin [session request] (.severe logger "Logging in, clj") FtpletResult/DEFAULT) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---