 
 
 (defonce *current-app-id* (atom nil))
+(defonce *current-app-version* (atom nil))
+
+(defonce *current-server-port* (atom nil))
 
 
 (defn make-thread-environment-proxy [& {:keys [user-email user-admin?]}]

        application-id (if (.exists appengine-web-file)
                           (first (xpath-value appengine-web-file "//application"))
                           "appengine-magic-app")
        proxy-factory (ApiProxyLocalFactory.)
        environment (proxy [LocalServerEnvironment] []
                      (getAppDir [] dir)

    (getAttributes [] (java.util.HashMap.))
    (getEmail [] (or user-email ""))
    (isAdmin [] (or (Boolean/parseBoolean user-admin?) false))
    (getAppId [] @*current-app-id*)
    (getVersionId [] @*current-app-version*)))


(defn appengine-init [#^File dir, port]
