|
Page Edited :
OPENEJB :
Deploy Tool
Deploy Tool has been edited by David Blevins (Aug 21, 2007). Content:NAMEopenejb deploy - OpenEJB Deploy Tool SYNOPSISopenejb deploy options <file> [<file>...] NOTEThe OpenEJB Deploy tool is an OPTIONAL tool that allows you to deploy into a running server and get feedback as if the app was deployed and how it was deployed (deploymentIds, jndi names, etc.). It can be used to deploy into an offline server, however in this scenario it simply copies the archive into the openejb.base/apps directory which is something that can be done manually with a simple copy command or drag and drop. The OpenEJB Deploy tool can be executed from any directory as long as <OPENEJB_HOME>/bin is in the system PATH. <OPENEJB_HOME> is the directory where OpenEJB was installed or unpacked. For for the remainder of this document we will assume you unpacked OpenEJB into the directory C:\openejb-3.0.0. In Windows, the deploy tool can be executed as follows: C:\openejb-3.0.0> bin\openejb deploy --help In UNIX, Linux, or Mac OS X, the deploy tool can be executed as follows: [[EMAIL PROTECTED] openejb-3.0.0]# bin/openejb deploy --help Depending on your OpenEJB version, you may need to change execution bits to make the scripts executable. You can do this with the following command. [[EMAIL PROTECTED] openejb-3.0.0]# chmod 755 bin/openejb From here on out, it will be assumed that you know how to execute the right openejb script for your operating system and commands will appear in shorthand as show below. openejb deploy --help DESCRIPTIONThe files passed to the Deploy Tool can be any combination of the following:
Archives ending in .ear or containing a META-INF/application.xml are assumed to be ear files. Archives containing a META-INF/ejb-jar.xml file or any classes annotated with @Stateless, @Stateful or @MessageDriven, are assumed to be EJB applications. EJB applications older that EJB 3.0 should contain a complete META-INF/ejb-jar.xml inside the jar, however we do not strictly enforce that – the act of it being incomplete makes it an EJB 3.0 application by nature. Archives containing a META-INF/application-client.xml or with a META-INF/MANIFEST.MF containing the "Main-Class" attribute, are assumed to be Application Client archives. OPTIONS
EXAMPLESDeploying multiple jar filesopenejb deploy myapp\fooEjbs.jar myapp\barEjbs.jar Deploys the beans in the fooEjbs.jar first, then deploys the beans in the barEjbs.jar. Wildcards can be used as well. openejb deploy myapp*.jar OUTPUTOn running the deploy tool with a valid EJB jar the following output is printed on the console Application deployed successfully at {0}
App(id=C:\samples\Calculator-new\hello-addservice.jar)
EjbJar(id=hello-addservice.jar, path=C:\samples\Calculator-new\hello-addservice.jar)
Ejb(ejb-name=HelloBean, id=HelloBean)
Jndi(name=HelloBean)
Jndi(name=HelloBeanLocal)
Ejb(ejb-name=AddServiceBean, id=AddServiceBean)
Jndi(name=AddServiceBean)
Jndi(name=AddServiceBeanLocal)
Note: In the above case the command used is C:\samples\Calculator-new>openejb deploy hello-addservice.jar. |
Unsubscribe or edit your notifications preferences
