Skip to content
Daniel Cunha (soro) edited this page Apr 3, 2015 · 7 revisions

Start server:

tomee-cli.core=> (start "[path-to-tomee]")    // Without TOMEE_HOME variable defined.
tomee-cli.core=> (start)                      // With TOMEE_HOME variable defined.

Stop server:

tomee-cli.core=> (stop "[path-to-tomee]")     // Without TOMEE_HOME variable defined.
tomee-cli.core=> (stop)                       // With TOMEE_HOME variable defined.

Restart server:

tomee-cli.core=> (restart "[path-to-tomee]")  // Without TOMEE_HOME variable defined.
tomee-cli.core=> (restart)                    // With TOMEE_HOME variable defined.

Print versions of the environment:

tomee-cli.core=> (version "[path-to-tomee]")  // Without TOMEE_HOME variable defined.
tomee-cli.core=> (version)                    // With TOMEE_HOME variable defined.

Deploy application:

tomee-cli.core=> (deploy "[path-to-tomee]" "[path-to-war/ear-file]")
tomee-cli.core=> (deploy "[path-to-war/ear-file]")

Undeploy application:

tomee-cli.core=> (undeploy "[path-to-tomee]" "[war/ear-file]")
tomee-cli.core=> (undeploy "[war/ear-file]")

Add new mail resource in tomee.xml:

tomee-cli.core=> (add-mail-resource :path "[TOMEE_HOME]" :id "[id-to-resource]" :host "[host-to-email-server]" :port "[port-to-email-server]" :protocol "[protocol-to-email-server]" :auth "[true/false]" :user "[username]" :password "[password]")

The parameters don't have ordenation. You need only specify the key, like the sample.

Default values:

:port = 25

:password = ""

:path = TOMEE_HOME

Add new datasource in tomee.xml:

tomee-cli.core=> (add-datasource-resource :path "[TOMEE_HOME]" :id "[id-to-resource]" :jdbc-drive "[jdbc-drive]" :jdbc-url "[jdbc-url]" :username "[username]" :password "[password]" :jta-managed "[jta-managed]"])

The parameters don't have ordenation. You need only specify the key, like the sample.

Default values:

:jdbc-drive = "org.hsqldb.jdbcDriver"

:jdbc-url = "jdbc:hsqldb:file:data/hsqldb/hsqldb"

:username = "sa"

:password = ""

:jta-managed = true.

:path = TOMEE_HOME.