...
openejb start - OpenEJB Remote Server
SYNOPSIS
openejb start options #options
NOTE
The OpenEJB Remote Server can be started by running the openejb.bat script for windows and the openejb script for Linux and other Unix based OSes. Before running these scripts you need to set the environment variable OPENEJB_HOME to the path of the directory where you unpacked the OpenEJB installation.
From now on we will refer to this directory as <OPENEJB_HOME> and assume that you unpacked OpenEJB into the directory C:\openejb-3.0.0
The startup scripts are present in the <OPENEJB_HOME>/bin directory. You can set this directory in the system PATH for starting openejb from the command shell.
In Windows, the remote server can be executed as follows:
C:\openejb-3.0.0> bin\openejb start
In UNIX, Linux, or Mac OS X, the deploy tool can be executed as follows:
[user@host openejb-3.0.0]# ./bin/openejb start
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.
[user@host 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 itself is configured with the OpenEJB configuration file, which is extremely simple and self-documenting. This file is located at c:\openejb-3.0.0\conf\openejb.xml.
OPTIONS
-D<name>=<value> | Specifies a system property passed into OpenEJB at startup. |
--admin-bind <host> | Binds Sets the host to which the OpenEJB admin service to the specified host address. Default host address is 0.0.0.0should be bound. |
--admin-port <int> | Binds Sets the port to which the OpenEJB admin service to the specified port. Default port is 4200should be bound. |
--conf <file> | Sets the OpenEJB configuration to the specified file. |
--ejbd-bind <host> | Binds Sets the Remote Server host to the specified host address. Default host address is 0.0.0.0. which the ejbd service should be bound. |
--ejbd-port <int> | Binds Sets the Remote Server port to the specified port. Default port is 4201which the ejbd service should be bound. |
--examples | Show examples of how to use the options. |
-h, --help | Print this help message. |
--hsql-bind <host> | Binds the embedded HSQL DB service to the specified host address. Default host address is 0.0.0.0 Sets the host to which the hsql service should be bound. |
--hsql-port <int> | Binds the embedded HSQL DB service to the specified port. Default port is 9001. Sets the port to which the hsql service should be bound. |
--httpejbd-bind <host> | Binds the EJB over HTTP service to the specified host address. Default host address is 0.0.0.0. Sets the host to which the httpejbd service should be bound. |
--httpejbd-port <int> | Binds the EJB over HTTP service to the specified port. Default port is 4204. Sets the port to which the httpejbd service should be bound. |
--local-copy <boolean> | Instructs the container system to marshal (ie, copy) all calls between beans. |
--telnet-bind <host> | Binds Sets the host to which the telnet administration service to the specified host address. Default host address is 0.0.0.0service should be bound. |
--telnet-port <int> | Binds Sets the port to which the telnet administration service to the specified Port. Default port is 4202. service should be bound. |
-v, --version | Print the version. |
...
openejb start --conf=C:\openejb-3.0.0\conf\mytest.conf
Sets the openejb.configuration system variable to the file C:\openejb\conf\mytest.conf
. When the server starts up and initializes OpenEJB, this configuration will be used to assemble the container system and load beans.
Example: --local-copy
The local-copy option controls whether Remote interface arguments and results are always copied.
openejb start --local-copy=true
(default)
Remote interface business method arguments and results are always copied (via serialization), which is compliant with the EJB standard Instructs the container system to marshal (ie, copy) all calls between beans are required by the EJB 1.1 specification.
openejb start --local-copy=false
Remote interface business method arguments and results are copied only when the client is in a different JVM. Otherwise, they are passed by reference - as if it were a Local interface. This is faster, of course, but non-compliant with the EJB standard.
Local interfaces are not affected; their arguments and results are passed by reference and never copied Instructs the container system to not marshal (copy) calls between beans. The container system as will pass parameters and return values without copying or marshalling as is required for EJB 2.0 Local interfaces.
CONFIG OVERRIDE EXAMPLES
...
Code Block |
---|
Apache OpenEJB 3.0.0-SNAPSHOT build: 2007081620070825-01:3910 http://openejb.apache.org/ INFO - openejb.home = C:\openejb-3.0.0-SNAPSHOT INFO - openejb.base = C:\openejb-3.0.0-SNAPSHOT DEBUG - Instantiating assembler class org.apache.openejb.assembler.classic.Assem bler INFO - Configuring Service(id=Default Security Service, type=SecurityService, pr ovider-id=Default Security Service) INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManag er, provider-id=Default Transaction Manager) INFO - Configuring Service(id=Default JMS Resource Adapter, type=Resource, provi der-id=Default JMS Resource Adapter) INFO - Configuring Service(id=Default JDBC Database, type=Resource, provider-id= Default JDBC Database) INFO - Configuring Service(id=Default Unmanaged JDBC Database, type=Resource, pr ovider-id=Default Unmanaged JDBC Database) INFO - Configuring Service(id=Default JMS Connection Factory, type=Resource, pro vider-id=Default JMS Connection Factory) INFO - Configuring Service(id=Default Local TX ConnectionManager, type=Connectio nManager, provider-id=Default Local TX ConnectionManager) INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory, type=ProxyFactory, p rovider-id=Default JDK 1.3 ProxyFactory) INFO - Configuring Service(id=Default CMP Container, type=Container, provider-id =Default CMP Container) INFO - Configuring Service(id=Default BMP Container, type=Container, provider-id =Default BMP Container) INFO - Configuring Service(id=Default Stateful Container, type=Container, provid er-id=Default Stateful Container) INFO - Configuring Service(id=Default Stateless Container, type=Container, provi der-id=Default Stateless Container) INFO - Configuring Service(id=Default MDB Container, type=Container, provider-id =Default MDB Container) INFO - Found EjbModule in classpath: C:\openejb-3.0.0-SNAPSHOT\lib\openejb-core- 3.0.0-SNAPSHOT.jar DEBUG - Searched 83 classpath urls in 291 milliseconds. Average 3 milliseconds per url. DEBUG - Beginning load: C:\openejb-3.0.0-SNAPSHOT\lib\openejb-core-3.0.0-SNAPSHO T.jar INFO - Configuring app: C:\openejb-3.0.0-SNAPSHOT\lib\openejb-core-3.0.0-SNAPSHO T.jar INFO - Loaded Module: C:\openejb-3.0.0-SNAPSHOT\lib\openejb-core-3.0.0-SNAPSHOT. jar INFO - Assembling app: C:\openejb-3.0.0-SNAPSHOT\lib\openejb-core-3.0.0-SNAPSHOT .jar INFO - Jndi(name=openejb/ConfigurationInfoBusinessRemote) INFO - Jndi(name=openejb/DeployerBusinessRemote) INFO - Jndi(name=MEJB) INFO - Created Ejb(deployment-id=openejb/ConfigurationInfo, ejb-name=openejb/Con figurationInfo, container=Default Stateless Container) INFO - Created Ejb(deployment-id=openejb/Deployer, ejb-name=openejb/Deployer, co ntainer=Default Stateless Container) INFO - Created Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default Stateles s Container) DEBUG - Containers : 5 DEBUG - Type Container ID DEBUG - BMP ENTITY Default BMP Container DEBUG - MESSAGE Default MDB Container DEBUG - CMP ENTITY Default CMP Container DEBUG - STATEFUL Default Stateful Container DEBUG - STATELESS Default Stateless Container DEBUG - Deployments : 3 DEBUG - Type Deployment ID DEBUG - STATELESS openejb/ConfigurationInfo DEBUG - STATELESS openejb/Deployer DEBUG - STATELESS MEJB DEBUG - SecurityService : org.apache.openejb.core.security.SecurityServiceImpl DEBUG - TransactionManager: org.apache.geronimo.transaction.manager.GeronimoTran sactionManager INFO - OpenEJB ready. OpenEJB ready. [OPENEJB:init] OpenEJB Remote Server [Server@1e758ca]: [Thread[main,5,main]]: checkRunning(false) entered [Server@1e758ca]: [Thread[main,5,main]]: checkRunning(false) exited ** Starting Services ** NAME IP PORT httpejbd 0.0.0.0 4204 telnet 0.0.0.0 4202 ejbd 0.0.0.0 4201 [Server@1e758ca]: Initiating startup sequence... [Server@1e758ca]: Server socket opened successfully in 0 ms. [Server@1e758ca]: [Thread[HSQLDB Server @1e758ca,5,main]]: run()/openDatabases() : [Server@1e758ca]: Initiating shutdown sequence... [Server@1e758ca]: Shutdown sequence completed in 10 ms. [Server@1e758ca]: 2007-08-20 07:10:30.453 SHUTDOWN : System.exit() was not calle d hsql 0.0.0.0 9001 admin thread 0.0.0.0 4200 ------- Ready! |