blob: 423434390df876986bdaca1868cf8540d0dad1ea [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Startup</title>
<meta name="description" content="Apache TomEE">
<meta name="author" content="Apache TomEE">
<meta name="google-translate-customization" content="f36a520c08f4c9-0a04e86a9c075ce9-g265f3196f697cf8f-10">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="./resources/css/bootstrap.css" rel="stylesheet">
<link href="./resources/css/prettify.css" rel="stylesheet">
<!--link href="./resources/css/bootstrap-mods.css" rel="stylesheet"-->
<link href="./resources/css/main.css" rel="stylesheet">
<link href="./resources/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet">
<script type="text/javascript">
var t = encodeURIComponent(document.title.replace(/^\s+|\s+$/g,""));
var u = encodeURIComponent(""+document.URL);
function fbshare () {
window.open(
"http://www.facebook.com/sharer/sharer.php?u="+u,
'Share on Facebook',
'width=640,height=426');
};
function gpshare () {
window.open(
"https://plus.google.com/share?url="+u,
'Share on Google+',
'width=584,height=385');
};
function twshare () {
window.open(
"https://twitter.com/intent/tweet?url="+u+"&text="+t,
'Share on Twitter',
'width=800,height=526');
};
function pinshare () {
window.open("//www.pinterest.com/pin/create/button/?url="+u+"&media=http%3A%2F%2Ftomee.apache.org%2Fresources%2Fimages%2Ffeather-logo.png&description="+t,
'Share on Pinterest',
'width=800,height=526');
};
</script>
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="./favicon.ico">
<link rel="apple-touch-icon" href="./resources/images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="./resources/images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="./resources/images/apple-touch-icon-114x114.png">
<script src="./resources/js/prettify.js" type="text/javascript"></script>
<script src="./resources/js/jquery-latest.js"></script>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
<script src="./resources/js/common.js"></script>
<script src="./resources/js/prettyprint.js"></script>
<!--script src="//assets.pinterest.com/js/pinit.js" type="text/javascript" async></script//-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2717626-1']);
_gaq.push(['_setDomainName', 'apache.org']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="topbar" data-dropdown="dropdown">
<div class="fill">
<div class="container">
<a class="brand" href="./index.html">Apache TomEE</a>
<ul class="nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Apache
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<!-- <li><a href="./misc/whoweare.html">Who we are?</a></li> -->
<!-- <li><a href="./misc/heritage.html">Heritage</a></li> -->
<li><a href="http://www.apache.org">Apache Home</a></li>
<!-- <li><a href="./misc/resources.html">Resources</a></li> -->
<li><a href="./misc/contact.html">Contact</a></li>
<li><a href="./misc/legal.html">Legal</a></li>
<li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li class="divider"/>
<li><a href="http://www.apache.org/security">Security</a></li>
</ul>
</li>
<li><a href="./index.html">Home</a></li>
<li><a href="./downloads.html">Downloads</a></li>
<li><a href="./documentation.html">Documentation</a></li>
<li><a href="./examples-trunk/index.html">Examples</a></li>
<li><a href="./support.html">Support</a></li>
<li><a href="./contribute.html">Contribute</a></li>
<li><a href="./security/index.html">Security</a></li>
</ul>
<!-- Google CSE Search Box Begins -->
<FORM class="pull-right" id="searchbox_010475492895890475512:_t4iqjrgx90" action="http://www.google.com/cse">
<INPUT type="hidden" name="cx" value="010475492895890475512:_t4iqjrgx90">
<INPUT type="hidden" name="cof" value="FORID:0">
<INPUT size="18" width="130" style="width:130px" name="q" type="text" placeholder="Search">
</FORM>
<!--<SCRIPT type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_010475492895890475512:_t4iqjrgx90"></SCRIPT>-->
<!-- Google CSE Search Box Ends -->
</div>
</div>
</div>
<div class="container">
<div class="page-header">
<small><a href="./index.html">Home</a></small><br>
<h1>Startup
<div style="float: right; position: relative; bottom: -10px; ">
<a onclick="javascript:gpshare()" class="gp-share sprite" title="Share on Google+">share [gp]</a>
<a onclick="javascript:fbshare()" class="fb-share sprite" title="Share on Facebook">share [fb]</a>
<a onclick="javascript:twshare()" class="tw-share sprite" title="Share on Twitter">share [tw]</a>
<a onclick="javascript:pinshare()" class="pin-share sprite" title="Share on Pinterest">share [pin]</a>
<a data-toggle="modal" href="#edit" class="edit-page" title="Contribute to this Page">contribute</a>
</div>
</h1>
</div>
<p><a name="Startup-NAME"></a></p>
<h1>NAME</h1>
<p>openejb start - OpenEJB Remote Server</p>
<p><a name="Startup-SYNOPSIS"></a></p>
<h1>SYNOPSIS</h1>
<p>openejb start <a href="#options.html">#options</a></p>
<p><a name="Startup-NOTE"></a></p>
<h1>NOTE</h1>
<p>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
<em>OPENEJB</em>HOME_ to the path of the directory where you unpacked the OpenEJB
installation. </p>
<p>From now on we will refer to this directory as <OPENEJB_HOME> and assume
that you unpacked OpenEJB into the directory <em>C:\openejb-3.0</em> The startup
scripts are present in the <OPENEJB_HOME>/bin directory. You can set this
directory in the system <em>PATH</em> for starting openejb from the command shell. </p>
<p>In Windows, the remote server can be executed as follows:</p>
<p><em>C:\openejb-3.0> bin\openejb start</em></p>
<p>In UNIX, Linux, or Mac OS X, the deploy tool can be executed as follows:</p>
<p>`[user@host openejb-3.0](user@host-openejb-3.0.html)</p>
<h1>./bin/openejb start`</h1>
<p>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.</p>
<p>`[user@host openejb-3.0](user@host-openejb-3.0.html)</p>
<h1>chmod 755 bin/openejb`</h1>
<p>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.</p>
<p><em>openejb start -help</em></p>
<p><a name="Startup-DESCRIPTION"></a></p>
<h1>DESCRIPTION</h1>
<p>Starts OpenEJB as an EJB Server that can be accessed by remote clients via
the OpenEJB Remote Server.</p>
<p>ALWAYS check your openejb.log file for warnings immediately after starting
the Remote Server.</p>
<p>OpenEJB issues warnings when it works around a potential problem,
encounters something it didn't expect, or when OpenEJB wants to let you
know something may not work as you expected it.</p>
<p>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\conf\openejb.xml.</p>
<p><a name="Startup-OPTIONS"></a></p>
<h1>OPTIONS</h1>
<p>| <em>-D<name>=<value></em> | Specifies a system property passed
into OpenEJB at startup. |
| <em>--admin-bind <host></em> | Sets the host to which the admin
service should be bound.|
| <em>--admin-port <int></em> | Sets the port to which the admin
service should be bound.|
| <em>--conf <file></em> | Sets the OpenEJB configuration to
the specified file. |
| <em>--ejbd-bind <host></em> | Sets the host to which the ejbd
service should be bound. |
| <em>--ejbd-port <int></em> | Sets the port to which the ejbd
service should be bound. | <br />
| <em>--examples</em> | Show examples of how to use the
options. |
| -h, --<em>help</em> | Print this help message. |
| <em>--hsql-bind <host></em> | Sets the host to which the hsql
service should be bound.|
| <em>--hsql-port <int></em> | Sets the port to which the hsql
service should be bound.|
| <em>--httpejbd-bind <host></em> | Sets the host to which the httpejbd
service should be bound.|
| <em>--httpejbd-port <int></em> | Sets the port to which the httpejbd
service should be bound.|
| <em>--local-copy <boolean></em> | Instructs the container system to
marshal (ie, copy) all calls between beans. |
| <em>--telnet-bind <host></em> | Sets the host to which the telnet
service should be bound.|
| <em>--telnet-port <int></em> | Sets the port to which the telnet
service should be bound.|
| -v, --<em>version</em> | Print the version. |</p>
<p><a name="Startup-EXAMPLES"></a></p>
<h1>EXAMPLES</h1>
<p><a name="Startup-Example:Simplestscenario"></a></p>
<h2>Example: Simplest scenario</h2>
<p><em>openejb start</em></p>
<p>That's it. The ejbd will start up and bind to IP 127.0.0.1 and port 4201.</p>
<p>The following properties would then be used to get an InitialContext from
the Remote Server.</p>
<pre><code>java.naming.factory.initial =
</code></pre>
<p>org.apache.openejb.client.RemoteInitialContextFactory
java.naming.provider.url = ejbd://127.0.0.1:4201
java.naming.security.principal = myuser
java.naming.security.credentials = mypass</p>
<p><a name="Startup-Example:--conf=file"></a></p>
<h2>Example: --conf=file</h2>
<p><em>openejb start --conf=C:\openejb-3.0\conf\mytest.conf</em></p>
<p>Sets the openejb.configuration system variable to the file
<em>C:\openejb\conf\mytest.conf</em>. When the server starts up and initializes
OpenEJB, this configuration will be used to assemble the container system
and load beans.</p>
<p><a name="Startup-Example:--local-copy"></a></p>
<h2>Example: --local-copy</h2>
<p>The local-copy option controls whether Remote interface arguments and
results are always copied. </p>
<p><em>openejb start --local-copy=true</em> (default)</p>
<p>Remote interface business method arguments and results are always copied
(via serialization), which is compliant with the EJB standard. </p>
<p><em>openejb start --local-copy=false</em></p>
<p>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. </p>
<p>Local interfaces are not affected; their arguments and results are passed
by reference and never copied. </p>
<p><a name="Startup-CONFIGOVERRIDEEXAMPLES"></a></p>
<h2>CONFIG OVERRIDE EXAMPLES</h2>
<p><a name="Startup-Example:-D<service>.bind=<address>"></a></p>
<h2>Example: -D<service>.bind=<address></h2>
<p><em>openejb start -Dejbd.bind=10.45.67.8</em></p>
<p>This is the most common way to use the EJBd Server Service. The service
will start up and bind to IP 10.45.67.8 and port 4201. The following
properties would then be used to get an InitialContext from the EJBd Server
Service.</p>
<pre><code> java.naming.factory.initial =
</code></pre>
<p>org.apache.openejb.client.RemoteInitialContextFactory
java.naming.provider.url = ejbd://10.45.67.8:4201
java.naming.security.principal = myuser
java.naming.security.credentials = mypass</p>
<p>DNS names can also be used.</p>
<p><em>openejb start -Dejbd.bind=myhost.foo.com</em></p>
<p>The following properties would then be used to get an InitialContext from
the Remote Server.</p>
<pre><code> java.naming.factory.initial =
</code></pre>
<p>org.apache.openejb.client.RemoteInitialContextFactory
java.naming.provider.url = ejbd://myhost.foo.com:4201
java.naming.security.principal = myuser
java.naming.security.credentials = mypass</p>
<p><em>openejb start -Dtelnet.bind=myhost.foo.com</em></p>
<p>The following properties would then be used to log into the server via a
telnet client as such:</p>
<p><em>telnet myhost.foo.com 4202</em></p>
<p><a name="Startup-Example:-D<service>.port=<port>"></a></p>
<h2>Example: -D<service>.port=<port></h2>
<p><em>openejb start -Dejbd.port=8765</em></p>
<p>The server will start up and bind to IP 127.0.0.1 and port 8765.</p>
<p>The following properties would then be used to get an InitialContext from
the Remote Server.</p>
<pre><code> java.naming.factory.initial =
</code></pre>
<p>org.apache.openejb.client.RemoteInitialContextFactory
java.naming.provider.url = ejbd://127.0.0.1:8765
java.naming.security.principal = myuser
java.naming.security.credentials = mypass</p>
<p><em>openejb start -Dhttpejbd.port=8888</em></p>
<p>The server will start up and the EJB over HTTP service will bind to IP
127.0.0.1 and port 8888.</p>
<p>The following properties would then be used to get an InitialContext from
the HTTP/Remote Server.</p>
<pre><code> java.naming.factory.initial =
</code></pre>
<p>org.apache.openejb.client.RemoteInitialContextFactory
java.naming.provider.url = http://127.0.0.1:8888/openejb
java.naming.security.principal = myuser
java.naming.security.credentials = mypass</p>
<p><a name="Startup-Example:-D<service>.only_from=<addresses>"></a></p>
<h2>Example: -D<service>.only_from=<addresses></h2>
<p><em>openejb start -Dadmin.only_from=192.168.1.12</em></p>
<p>Adds 192.168.1.12 to the list of IP addresses that are authorized to
shutdown the server or access the server
via a telnet client. The host that this server was started on is always
allowed to administer the server.</p>
<p>Multiple hosts can be given administrative access to this server by
listing all the host names separated
by commas as such:</p>
<p><em>openejb start -Dadmin.only_from=192.168.1.12,joe.foo.com,robert</em></p>
<p>The first host in the string names the host explicitly using an IP address
(192.168.1.12).</p>
<p>The second host uses a DNS name (joe.foo.com) to refer to the hosts IP
address. The DNS name will be resolved and the IP will be added to the
admin list.</p>
<p>The third address refers to a the host by a name (robert)that the
opperating system is able to resolve into a valid IP address. This is
usually done via a hosts file, interal DNS server, or Windows Domain
Server.</p>
<p><a name="Startup-Example:-D<service>.threads=<max>"></a></p>
<h2>Example: -D<service>.threads=<max></h2>
<p><em>openejb start -Dejbd.threads=200</em></p>
<p>Sets the max number of concurrent threads that can enter the EJBd Server
Service to 200.</p>
<p><a name="Startup-Example:-D<service>.disabled=<true/false>"></a></p>
<h2>Example: -D<service>.disabled=<true/false></h2>
<p><em>openejb start -Dtelnet.disabled=true</em></p>
<p>Prevents the Telnet Server Service from starting when the OpenEJB Server
starts.</p>
<p><a name="Startup-CONSOLEOUTPUT"></a></p>
<h1>CONSOLE OUTPUT</h1>
<p>Once you start OpenEJB using the <em>openejb start</em> command the following
output will be seen on the console </p>
<pre><code>Apache OpenEJB 3.0 build: 20070825-01:10
http://tomee.apache.org/
OpenEJB ready.
[OPENEJB:init]
</code></pre>
<p>OpenEJB Remote Server
<em>* Starting Services *</em>
NAME IP PORT
httpejbd 0.0.0.0 4204
telnet 0.0.0.0 4202
ejbd 0.0.0.0 4201
hsql 0.0.0.0 9001
admin thread 0.0.0.0 4200
-------
Ready!</p>
<div id="edit" class="modal hide fade in" style="display: none; ">
<div class="modal-header">
<a class="close" data-dismiss="modal">x</a>
<h3>Thank you for contributing to the documentation!</h3>
</div>
<div class="modal-body">
<h4>Any help with the documentation is greatly appreciated.</h4>
<p>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 :)</p>
<small>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.</small>
<!--[if gt IE 6]>
<h4>Internet Explorer Users</h4>
<p>If you are not an Apache committer, click the Yes link and enter a <i>anonymous</i> for the username and leave the password empty</p>
<![endif]-->
</div>
<div class="modal-footer">
Do you have an Apache ID?
<a href="javascript:void(location.href='https://cms.apache.org/redirect?uri='+escape(location.href))" class="btn">Yes</a>
<a href="javascript:void(location.href='https://anonymous:@cms.apache.org/redirect?uri='+escape(location.href))" class="btn">No</a>
</div>
</div>
<script src="./resources/js/bootstrap-modal.js"></script>
<footer>
<p>Copyright &copy; 1999-2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
</footer>
</div> <!-- /container -->
<!-- Javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="./resources/js/bootstrap-dropdown.js"></script>
</body>
</html>