"web" service configuration
This service provides containers for the web components used by the Java EE applications.
JOnAS (v. 5x) provides two implementations of this service : one for Jetty 6.x, one for Tomcat 6.x. It is necessary to run this service in order to use the JonasAdmin tool. A web container is created from a war file.
In development mode, as all other Java EE archives war archives can be deployed automatically as soon as they are copied under $JONAS_BASE/deploy and undeployed as soon as they has been removed from this location.
Here is the part of jonas.properties concerning the web service :
####################### JOnAS Web container service configuration
### Set the name of implementation class of the web container service.
jonas.service.web.class org.ow2.jonas.web.tomcat6.Tomcat6Service
#jonas.service.web.class org.ow2.jonas.web.jetty6.Jetty6Service
# Set the XML deployment descriptors parsing mode for the WEB container service (with or without validation).
jonas.service.web.parsingwithvalidation true
# If true, the onDemand feature is enabled. A proxy is listening on the http port and will make actions like starting or deploying applications.
# The web container instance is started on another port number (that can be specified) but all access are proxified.
# It means that the web container will be started only when a connection is done on the http port.
# The .war file is also loaded upon request.
# This feature cannot be enabled in production mode.
jonas.service.web.ondemand.enabled true
# The redirect port number is used to specify the port number of the http web container.
# The proxy will listen on the http web container port and redirect all requests on this redirect port
# 0 means that a random port is used.
jonas.service.web.ondemand.redirectPort 0
For customizing the web service, it is possible to :
1. Set or not the XML validation at the deployment descriptor parsing time.
2. Enable or not the onDemand feature.
In addition of activating this global feature, each web application that has to be loaded on demand must declare the on-demandelement in the JOnAS deployment descriptor (WEB-INF/jonas-web.xml) as below :
<?xml version="1.0" encoding="ISO-8859-1"?>
<jonas-web-app xmlns="http://www.objectweb.org/jonas/ns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.objectweb.org/jonas/ns http://www.objectweb.org/jonas/ns/jonas-web-app_5_1.xsd">
...
<!-- Load this application on demand
(if enabled in the webcontainer service)
-->
<on-demand>true</on-demand>
</jonas-web-app>
3. This property is specific to the onDemand feature.
Useful to set the port number of the http web container in case of the port number defined in the web server configuration is used by the proxy.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.