Various utility functions.
Various utility functions.
(app-name)
Returns the name of the current application.
Returns the name of the current application.
(app-relative & path)
Returns an absolute file relative to app-root
.
DEPRECATED: use clojure.java.io/resource instead.
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.
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.
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.
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.
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.
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.
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
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.
Returns true if running inside a WildFly/EAP container.
(in-eap?)
Returns true if running inside an EAP container.
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.
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.
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.
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.
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
Sets the global log level for the interal logging system. Valid options for `level` are: :OFF, :ERROR, :WARN, :INFO, :DEBUG, :TRACE, :ALL
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close