blob: 793201e3aea21880e6f5a6848d49fa7aeeaae051 [file] [log] [blame]
Title: Telnet Console
{note} Availability: Since OpenEJB 0.9{note}
<a name="TelnetConsole-BasicUsage"></a>
# Basic Usage
To use OpenEJB's Telnet Console, simply boot your server normally.
> $ ./bin/openejb start
OPENEJB_HOME=/Users/dblevins/Desktop/openejb-1.0
OpenEJB 1.0 build: 20060226-1701
http://www.openejb.org
resources 1
OpenEJB ready.
[init]
OpenEJB Remote Server
** Starting Services **
NAME IP PORT
webadmin 0.0.0.0 4203
httpejbd 0.0.0.0 4204
telnet 0.0.0.0 4202
ejbd 0.0.0.0 4201
admin 0.0.0.0 4200
-------
Ready!
Then in another shell telnet in
> $ telnet localhost 4202
Trying ::1...
Connected to localhost.
Escape character is '^]
'.
OpenEJB Remote Server Console
type 'help' for a list of commands
[openejb]
$ help
stop
exit
system
version
lookup
help
[openejb]
$ system
Containers:
Default BMP Container
Default CMP Container
Default Stateful Container
Default Stateless Container
Deployments:
client/tests/stateful/EncBean
client/tests/entity/cmp/RMI-over-IIOP/EJBHome
client/tests/stateful/BasicStatefulHome
ClientTools/ViewClass
Webadmin/Configuration
EJBGenerator/CreateEJB
ClientTools/InvokeObject
Webadmin/Properties
client/tests/stateful/RMI-over-IIOP/EJBHome
Webadmin/Home
client/tests/entity/bmp/allowed_operations/EntityHome
client/tests/entity/cmp/EncBean
httpd/DefaultBean
client/tests/stateful/BeanManagedBasicStatefulHome
client/tools/DatabaseHome
client/tests/entity/bmp/EncBean
config/webadmin/ConfigurationData
deploy/webadmin/Deployer
ClientTools/ViewJndi
Webadmin/DeploymentList
client/tests/stateless/BeanManagedBasicStatelessHome
Webadmin/CMPMapping
client/tests/stateless/EncBean
client/tests/stateful/BeanManagedTransactionTests/EJBHome
client/tests/entity/bmp/RMI-over-IIOP/EJBHome
Webadmin/ListLogs
client/tests/stateless/BeanManagedTransactionTests/EJBHome
ClientTools/ViewEjb
client/tests/entity/bmp/BasicBmpHome
mapping/webadmin/CMPMappingData
client/tests/stateless/BasicStatelessHome
client/tests/entity/cmp/BasicCmpHome
Webadmin/Deployment
httpd/session
client/tests/entity/cmp/allowed_operations/EntityHome
client/tests/stateless/RMI-over-IIOP/EJBHome
[openejb]
$ exit
Connection closed by foreign host.
<a name="TelnetConsole-ConfiguringtheTelnetService"></a>
# Configuring the Telnet Service
The configuration of all server services (network facing services) is done
in xinet.d style config files. The telnet shell is controlled via the
$OPENEJB_HOME/conf/telnet.properties file. This file is created for you
automatically after the first time OpenEJB boots.
> $ cat conf/telnet.properties
server = org.openejb.server.telnet.TelnetServer
bind = 127.0.0.1
port = 4202
disabled = false
threads = 5
# only_from = 192.168.1.123
You can change the IP, port, and even the number of threads allowed to
concurrently access the Telnet service via this file.
<a name="TelnetConsole-DisablingtheTelnetService"></a>
# Disabling the Telnet Service
Simply edit the config file and set 'disabled' to true
disabled = true
Then restart OpenEJB.
<a name="TelnetConsole-RestrictingAccess"></a>
# Restricting Access
It is unlikely you want just anyone to be able to login and execute
commands. While you can't restrict access on a user basis, yet, you can
restrict access to specific hosts. Host based access control (HBA) is a
built-in part of any Server Service in OpenEJB and the Telnet Service is no
different. This is done with the 'only_from' property, which like the
rest of the file is a direct copy of the xinet.d syntax for HBA.
For an example to restrict access to the localhost, you could configure the
Telnet Service like this:
server = org.openejb.server.telnet.TelnetServer
bind = 127.0.0.1
port = 4202
disabled = false
threads = 5
only_from = localhost
If you wanted to restrict access to localhost *and* say the hosts
192.168.1.207 and 192.168.1.16, you can simply add them to the list.
server = org.openejb.server.telnet.TelnetServer
bind = 127.0.0.1
port = 4202
disabled = false
threads = 5
only_from = localhost, 192.168.1.207, 192.168.1.16