CrossClj

3.0.0-alpha1 docs

SourceDocs



RECENT
    VARS
    app-name
    app-relative
    app-root
    at-exit
    classpath
    context-path
    dev-mode?
    http-port
    in-cluster?
    in-container?
    in-eap?
    messaging-remoting-port
    reset
    reset-fixture
    set-bean-property
    set-log-level!

    « Index of all namespaces of this project

    Various utility functions.
    
    (app-name)
    Returns the name of the current application.
    
    Deprecated
    (app-relative & path)
    Returns an absolute file relative to [[app-root]].
    DEPRECATED: use clojure.java.io/resource instead.
    (app-root)
    Returns a file pointing to the root dir of the application.
    DEPRECATED: use clojure.java.io/resource instead.
    (at-exit f)
    Registers f to be called when the application is either stopped
    or, if running within a container, undeployed. Used internally to
    shutdown various services, but can be used by application code as
    well.
    (classpath)
    Returns the effective classpath for the application.
    
    (context-path)
    Returns the over-arching context-path for the web server.
    
    Returns the servlet-context's context path in-container, and ""
    outside.
    (dev-mode?)
    Returns true if the app is running in dev mode.
    
    This is controlled by the LEIN_NO_DEV environment variable.
    (http-port)(http-port options)
    Returns the HTTP port for the embedded web server.
    
     Returns the correct port when in-container, and the :port value from
    options or the default (8080) outside.
    (in-cluster?)
    Returns true if running inside a WildFly/EAP container that's part of a cluster
    
    (in-container?)
    Returns true if running inside a WildFly/EAP container.
    
    (in-eap?)
    Returns true if running inside an EAP container.
    
    (messaging-remoting-port)
    Returns the port that HornetQ is listening on for remote connections.
    
    Returns the correct port when in-container, and the default (5445),
    outside.
    (reset)
    Resets the underlying WunderBoss layer.
    This stops and clears all services. Intended to be used from a repl or from tests.
    (reset-fixture f)
    Invokes f, then calls [[reset]] if not [[in-container?]].
    
    Useful as a test fixture where you want to reset underlying state
    after a test run, but also run the same tests in-container (via fntest
    or other), where resetting state will disconnect the repl. In the
    in-container case, you rely on undeploy to reset the state.
    (set-bean-property bean prop value)
    Calls a java bean-style setter (.setFooBar) for the given property (:foo-bar) and value.
    
    (set-log-level! level)
    Sets the global log level for the interal logging system.
    
    Valid options for level are: :OFF, :ERROR, :WARN, :INFO, :DEBUG, :TRACE, :ALL