Skip to content

Instantly share code, notes, and snippets.

@jsmpereira
Created November 2, 2010 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsmpereira/ffaea21e7de730165da6 to your computer and use it in GitHub Desktop.
Save jsmpereira/ffaea21e7de730165da6 to your computer and use it in GitHub Desktop.
;;;; Java Server
;
; RMIConnection rc = new RMIConnectionImpl(this);
; Registry r = LocateRegistry.createRegistry(6060);
; r.rebind("rmi://localhost/rmiconnect", rc);
;;;; Clojure client
; One way
(def rmiconnect (doto (java.rmi.registry.LocateRegistry/getRegistry 6060)
(.lookup "rmiconnect")))
; Other way
(def rmi-registry (java.rmi.registry.LocateRegistry/getRegistry 6060))
(let [rmiconnect (.lookup rmi-registry "rmiconnect")])
; I get 'java.rmi.NotBoundException: rmiconnect' in both cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment