This aims to be more dynamic in the way you deploy your applications. It is clearly cloud oriented.
Webapp can be deployed as Tomcat does. Simply put it in webapps folder (or the one you configured) and start TomEE.
By default TomEE deploys applications (ear, war, jar) contained in $CATALINA_BASE/apps directory at start up.
OpenEJB provides a Deployer EJB to do this task. It can be used in your own software looking up remotely the "openejb/DeployerBusinessRemote" EJB. Its interface is "org.apache.openejb.assembler.Deployer". The needed dependency is org.apache.openejb:openejb-core.
Once you got your deployer simply invoke the "deploy" method. Give it the location of your application (can be a file, http, https, maven location depending on the way you configured your container, for more information have a look to TomEE provisionning).
Note: the "undeploy" method exists too and take the same path.
The Deployer is the base of all other solutions
org.apache.openejb:tomee-maven-plugin can be used to deploy/undeploy your application. Once this plugin is added to your pom you have access to the following configuration:
Then simply run
mvn tomee:deploy <path>
mvn tomee:undeploy <path>
When you start TomEE you can locally access the TomEE webapps (http://host:ip/tomee/).
Then simply go to JNDI tree, select the deployer in the tree, then click on "invoke this ejb", select the deploy (or undeploy) method, fill the path and click on "invoke".
If you want to cloudify your application, you'll get a configuration database (or any other storage system ;)).
So it means it is easy for you to get a host and a port...so it is easy to deploy on all your server using the deployer: simply use the maven provisioning then run the deployer on all your nodes and that's all!
If you are using a route to deploy/undeploy your applications you can have a look to the proposed camel-openejb component:
All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.