Getting started with JOnAS 5.0.2 / OSGi
|
This guide applies only if you're using the OSGi version of JOnAS 5.0.2
|
Download
Start by
downloading JOnAS/OSGi from the OW2 forge.
You can choose upon 2 OSGi archives:
- jonas-osgi-5.0.2.zip for windows users
- jonas-osgi-5.0.2.tar.gz for linux users
Install
- Unpack the assembly (unzip / tar zxf)
- This creates a jonas-osgi-5.0.2 directory
- This is your new JONAS_ROOT
You can now move the JONAS_ROOT at any place that suits you.
|
JOnAS binaries location must be specified in the JONAS_ROOT environment variable.
|
Run
|
A JDK 1.5 is required for running JOnAS 5.0.2.
|
Start
To start a server use command:
- $JONAS_ROOT/bin/jonas start
All the services defined in jonas.properties configuration file are launched.
-------------------------------------------------------------------
- JOnAS 5 - OSGi on Unix platform -
- JOnAS 5: Java(TM) Open Application Server -
- http://jonas.ow2.org -
- Contact: jonas-team@ow2.org -
-------------------------------------------------------------------Welcome to OW2 JOnAS (Running on Felix).
-----------------------------------------------
2008-01-28 15:46:29,723 : NameServiceManager.startNonStartedNS : Name service for jrmp is started on port 1099
2008-01-28 15:46:29,726 : CarolRegistryService.doStart : Carol Registry Service Started
2008-01-28 15:46:30,637 : JOnASJMXService.doStart : JMX Service started, using connector(s) [service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jrmpconnector_jonas]
2008-01-28 15:46:34,963 : J2EEServer.info : JOnAS server jonas STARTING !
..............
..............
2008-01-28 15:47:06,032 : BaseWebContainerService.registerWar : War /home/danesa/jonasbases/jb.5.0.2/deploy/jonasAdmin.war available at the context /jonasAdmin.
2008-01-28 15:47:06,296 : J2EEServer.info : JOnAS server jonas RUNNING !
To start only mandatory services ('registry' and 'jmx') use command:
- $JONAS_ROOT/bin/jonas bootstrap
The server is in STOPPED state but it is manageable via JMX. The server can be started latter using $JONAS_ROOT/bin/jonas start.
-------------------------------------------------------------------
- JOnAS 5 - OSGi on Unix platform -
- JOnAS 5: Java(TM) Open Application Server -
- http://jonas.ow2.org -
- Contact: jonas-team@ow2.org -
-------------------------------------------------------------------
Start JOnAS Bootstrap only.Welcome to OW2 JOnAS (Running on Felix).
-----------------------------------------------2008-01-28 15:43:33,841 : NameServiceManager.startNonStartedNS : Name service for jrmp is started on port 1099
2008-01-28 15:43:33,844 : CarolRegistryService.doStart : Carol Registry Service Started
2008-01-28 15:43:35,797 : JOnASJMXService.doStart : JMX Service started, using connector(s) [service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jrmpconnector_jonas]
2008-01-28 15:43:37,637 : J2EEServer.info : JOnAS server jonas STOPPED !
Stop
To stop services used command:
- $JONAS_ROOT/bin/jonas stop
All the services, except the mandatory ones, are stopped.
-------------------------------------------------------------------
- JOnAS 5 - OSGi on Unix platform -
- JOnAS 5: Java(TM) Open Application Server -
- http://jonas.ow2.org -
- Contact: jonas-team@ow2.org -
-------------------------------------------------------------------
You are administering server named jonas
service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas
2008-01-28 15:50:13,879 : J2EEServer.info : JOnAS server jonas STOPPING !
..............
..............
2008-01-28 15:50:17,513 : J2EEServer.info : JOnAS server jonas STOPPED !
To stop all the services and exit the JVM use command:
- $JONAS_ROOT/bin/jonas halt
-------------------------------------------------------------------
- JOnAS 5 - OSGi on Unix platform -
- JOnAS 5: Java(TM) Open Application Server -
- http://jonas.ow2.org -
- Contact: jonas-team@ow2.org -
-------------------------------------------------------------------
You are administering server named jonas
service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas
Halting server jonas...2008-01-28 15:38:14,312 : J2EEServer.info : JOnAS server jonas STOPPED !
2007-12-14 22:15:22,978 : JOnASJMXService.doStop : JMX Service stopped
2007-12-14 22:15:22,987 : CarolRegistryService.doStop : Carol Registry Service Stopped
Admin
Use the admin command based on JMX Remote to administer a server:
- $JONAS_ROOT/bin/jonas admin
-------------------------------------------------------------------
- JOnAS 5 - OSGi on Unix platform -
- JOnAS 5: Java(TM) Open Application Server -
- http://jonas.ow2.org -
- Contact: jonas-team@ow2.org -
-------------------------------------------------------------------
You are administering server named jonas
service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas
Admin (jonas) >
- You can also use the jonasAdmin web application. This application is automatically deployed with default settings.
Deploy
A new JOnAS service, 'depmonitor', allows dynamic deployment of all module types and J2EE applications being installed under JONAS_ROOT/deploy directory.
This service may be configured in 'development' mode to allow dynamic undeploy/re-deploy of modified files. The old layout based on ejbjars, webapps, rars and apps directories, is still supported.