Excerpt |
---|
Pax Web is an implementation of OSGi R4 Http Service using Jetty 6. |
System Requirements- Java5 virtual machine running on a supported operating system.
- An OSGi framework compliant with the R4 Core specification.
- Pax Logging Service.
- (Optional) A Config Admin Service that is R4 compliant. (see configuration section for details)
Anchor |
---|
| build | build | Building
The source code can be build using Maven 2 ( >= 2.0.6, not tested for maven < 2.0.6 )
Building the service
- Checkout the source code
- Go to the root of the downloaded project and run the following:
Code Block |
---|
mvn clean install
|
Building the samples
- Checkout the source code
- Go to the root of the downloaded project and run the following:
Code Block |
---|
mvn clean install
|
Installation
Manual installation
- Add the following dependency to your pax runner pom:
Code Block |
---|
<dependency>
<groupId>org.ops4j.pax.web.bundles</groupId>
<artifactId>service</artifactId>
<version>0.2.0</version>
</dependency>
|
- Ensure that you have the following repository:
Code Block |
---|
<repository>
<id>ops4j-repository</id>
<url>http://repository.ops4j.org/maven2</url>
</repository>
|
- Start pax runner
- ! you must have a logging framework installed
- Create a project using
pax-create-project
(if you do not already have one) - Ensure that you have the following repository:
Code Block |
---|
<repository>
<id>ops4j-repository</id>
<url>http://repository.ops4j.org/maven2</url>
</repository>
|
- Import pax web bundle using
pax-import-bundle -g org.ops4j.pax.web.bundles -a service -v 0.2.0
- Start
pax-provision
- ! you must have a logging framework installed
Building
The source code can be build using Maven 2 ( >= 2.0.6, not tested for maven < 2.0.6 )
Building the service
- Checkout the source code
- Go to the root of the downloaded project and run the following:
Code Block |
---|
mvn clean install
|
Building the samples
- Checkout the source code
- Go to the root of the downloaded project and run the following:
Code Block |
---|
mvn clean install
|
Source code
You must have a valid ops4j account in order to be able to checkout code from the source code repository.
Anchor |
---|
| SourceCodeService |
---|
| SourceCodeService |
---|
|
Service source code
You can download the source code from: https://scm.ops4j.org/repos/ops4j/projects/pax/web
You can browse the source code using FishEye at http://scm.ops4j.org/browse/OPS4J/projects/pax/web.
Anchor |
---|
| SourceCodeSamples |
---|
| SourceCodeSamples |
---|
|
Samples source code
You can download the source code from: https://scm.ops4j.org/repos/ops4j/projects/pax/web-samples
You can browse the source code using FishEye at http://scm.ops4j.org/browse/OPS4J/projects/pax/web-samples.
Issue tracker
The issue tracker is to be found at http://issues.ops4j.org/jira/browse/PAXWEB.
Here are the current open issues:
Jira Issues |
---|
columns | summary |
---|
url | http://issues.ops4j.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?&pid=10110&status=1&sorter/field=issuekey&sorter/order=DESC&tempMax=1000 |
---|
|
Configuration
Pax Web supports different configuration options as follows. The default configuration setup will first look for configuration admin, then for environment properties and last for default values. Note that this sequesnce is followed for each configuration property.
Configuration via OSGi environment properties
In order to configure Pax Web via OSGi environment properties set the following properties:
org.osgi.service.http.port
- This property specifies the port used for servlets and resources accessible via HTTP. The default value for this property is 8080.org.osgi.service.http.port.secure
- This property specifies the port used for servlets and resources accessible via HTTPS. The default value for this property is 443.
Configuration via OSGi Configuration Admin Service
Pax Web can be configued via Configuration Admin Service (if available). The PID used for configuration is org.osgi.service.http.HttpService
.
It supports the following properties:
org.osgi.service.http.port
- This property specifies the port used for servlets and resources accessible via HTTP.org.osgi.service.http.port.secure
- This property specifies the port used for servlets and resources accessible via HTTPS.org.osgi.service.http.enabled
- This property specifies if the HTTP is enabled.org.osgi.service.http.secure.enabled
- This property specifies if the HTTPS is enabled.
TODO
Examples
Department Store
The Pax Wicket Department Store example running using Pax Web
TODO - explain how to run it.
The example exposes a configuration page that can be used to configure Pax Web via the HttpServiceConfigurer.
TODO - explain how to run it.
Using Configuration Admin from Felix and FileInstall from Peter Kriens
This example deploys a configuration admin service and fileinstall for controlling the configuration of Pax Web.
Using fileinstall you will be able to change a configuration file (properties file) and see the web server reconfiguring itself.
TODO - explain how to run it.