Pax Wicket - 2.1.0

Pax Wicket - 2.1.0

Release 2.1.0 (Wicket 6, 2013-01-23)

Overview

The 2.1.0 release is the next shining feature releases to come for the Wicket 6.x/Pax Wicket 2.x series. This release contains quite a lot of new features for your project: In name it's now possible to use the correct filter life cycle; Use DS in your projects, Use plain OSGi service references in your projects; Inject special beans (BundleContext for now) without any additional work required.

In addition a lot of bug fixing and stabilization work had been done which includes: Concurrency problems had been removed; The page factory works again; Some more internal and rare problems had been resolved too.

-Enjoy

The Pax Wicket Team

Noticeable Improvements/New Features compared to 2.0.x

Because of using semver.org no changes are required. Nevertheless, the 2.1.0 release includes the following improvements and new features worth a notice:

Optional usage of correct filter lifecycle

Before PAX-WICKET 2.0.0 the filter does not implement the correct filter lifecycle right now, but rather creates a new filter for each request and neither calls the init nor the destroy methods.While with PAX-WICKET 2.0.0 the correct lifecycle is available by default you can use it now also for 1.x if you like by adding a "pax.wicket.filter.maintainlifecycle=false" property to your filter.

Support for DS

Example for registering a ApplicationFactory with Declarative Services (using 'wicket' as the mount point and 'testapplication' as application name):

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="de.laeubisoft.wicket.test.applicationfactory">
   <implementation class="de.laeubisoft.wicket.test.PAXWebApplicationFactory"/>
   <property name="pax.wicket.applicationname" type="String" value="testapplication"/>
   <property name="pax.wicket.mountpoint" type="String" value="wicket"/>
   <service>
      <provide interface="org.apache.wicket.protocol.http.IWebApplicationFactory"/>
   </service>
</scr:component>

Before version 2.0.0 use interface="org.apache.wicket.protocol.http.IWebApplicationFactory"

Registering a FilterFactory with Declarative Services for the application above:

<?xml version="1.0" encoding="UTF-8 "?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="de.laeubisoft.wicket.test.filter">
   <implementation class="de.laeubisoft.wicket.test.PAXFilterFactory"/>
   <property name="pax.wicket.applicationname" type="String" value="testapplication"/>
   <service>
      <provide interface="org.ops4j.pax.wicket.api.FilterFactory"/>
   </service>
</scr:component>

Support for ordinary service injection

Similar to DS it's now possible to inject any ordinary service using the PaxWicketBean annotation.

Automate injection of special beans

The BundleContext could now be injected without explicitely naming it. Simply add the following lines will inject the bundleContext independent of the used provider (blueprint, spring, ds, ...)

Download

The following sections presents where you can retrieve PAX-WICKET from.

Direct Download

The service bundle can be downloaded https://search.maven.org/remotecontent?filepath=org/ops4j/pax/wicket/org.ops4j.pax.wicket.service/0.8.6/org.ops4j.pax.wicket.service-0.8.6.jarhere, the source reference https://search.maven.org/remotecontent?filepath=org/ops4j/pax/wicket/org.ops4j.pax.wicket.service/0.8.6/org.ops4j.pax.wicket.service-0.8.6-sources.jarhere and the javadoc https://search.maven.org/remotecontent?filepath=org/ops4j/pax/wicket/org.ops4j.pax.wicket.service/0.8.6/org.ops4j.pax.wicket.service-0.8.6-javadoc.jarhere.

While Maven or Karaf will take care of the dependencies automatically please download the following dependencies manually if you use neither of them:

  • A HTTP Service that is R3 compliant (use Pax Web or Felix HTTP service here)
  • CGLib
  • Pax Logging Service (or any other SLF4J frontend) (mvn:org.ops4j.pax/pax-logging-api/1.6.4,mvn:org.ops4j.pax/pax-logging-service/1.6.4)
  • Wicket (util, request and core starting from version 6)
  • OPS4J Base Lang

Maven

All artifacts are distributed and available via the maven central repository

<!-- Pax Wicket Core -->
<dependency>
  <groupId>org.ops4j.pax.wicket</groupId>
  <artifactId>org.ops4j.pax.wicket.service</artifactId>
  <version>2.1.0</version>
</dependency>
<!-- Pax Wicket Test Utilities -->
<dependency>
  <groupId>org.ops4j.pax.wicket</groupId>
  <artifactId>org.ops4j.pax.wicket.test</artifactId>
  <version>2.1.0</version>
</dependency>

Karaf

Pax Wicket comes with Karaf feature files for the pax-wicket core and for the samples:

features:addurl mvn:org.ops4j.pax.wicket/features/2.1.0/xml/features
features:addurl mvn:org.ops4j.pax.wicket.samples/features/2.1.0/xml/features

We also support the upcoming Karaf 3.0.0 release out of the box. Please keep in mind that the commands are slightly different for that version

feature:url-add mvn:org.ops4j.pax.wicket/features/2.1.0/xml/features
feature:url-add mvn:org.ops4j.pax.wicket.samples/features/2.1.0/xml/features

Source code

You can browse, download and checkout the source code at https://github.com/ops4j/org.ops4j.pax.wicket/tree/v2.1.0.

Detailed Changelog

In detail we've fixed 16 issues in this release which are:

Sub-task

Bug

  • [PAXWICKET-327] - Pax Wicket breaks when starting wicket and wicket-app at once: IllegalStateException: Filter path was not configured (Http Error 500)
  • [PAXWICKET-378] - If <wicket:application> not started before pages : org.ops4j.pax.wicket.api.NoBeanAvailableForInjectionException: For Component id.co.bippo.web.pub.HomePage 13 could be injected but only 2 had been injected.
  • [PAXWICKET-388] - PaxWicketBundleListener does not recognize Bundles when they are started after the service bundle
  • [PAXWICKET-389] - Inside Eclipse Envoirments BundleDelegatingExtensionTracker can sometimes not resolve the real classname
  • [PAXWICKET-390] - BundleDelegatingPageMounter scans too much bundles
  • [PAXWICKET-397] - pax:provision in samples directory fails
  • [PAXWICKET-398] - More than one Filterfactory causes CC Exception

Dependency upgrade

Improvement

  • [PAXWICKET-366] - Bundles not importing org.apache.wicket package, but using Require-Bundle org.ops4j.pax.wicket.service are also relevant
  • [PAXWICKET-399] - FilterFactory carry redundant information
  • [PAXWICKET-400] - HttpTracker should be refactored

New Feature

  • [PAXWICKET-152] - automate injection of special beans
  • [PAXWICKET-346] - Add support for Declarative Services to PAX-WICKET
  • [PAXWICKET-351] - The inject mechanism should support Declarative Components or even ordinary services.

Task