Pax Wicket - 1.2.0

Pax Wicket - 1.2.0

Release 1.2.0 (Wicket 5, 2013-01-20)

Overview

The 1.2.0 release will be the last feature release for the Wicket 5.x/Pax Wicket 1.x series. The efforts will now focus on providing new features for the current "main line" Wicket 6.x/Pax Wicket 2.x and the next coming Wicket 7.x/Pax Wicket 3.x release. BUT as long as Wicket receives updates/new features on this branch we'll provide bug fixes for it; so don't worry.

Independently 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 1.1.x

Because of using semver.org no changes are required. Nevertheless, the 1.2.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, ...)

@PaxWicketBean
private BundleContext bundleContext;

Download

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

Direct Download

The service bundle can be downloaded here, the source reference here and the javadoc here.

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)

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>1.2.0</version>
</dependency>
<!-- Pax Wicket Test Utilities -->
<dependency>
  <groupId>org.ops4j.pax.wicket</groupId>
  <artifactId>org.ops4j.pax.wicket.test</artifactId>
  <version>1.2.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/1.2.0/xml/features
features:addurl mvn:org.ops4j.pax.wicket.samples/features/1.2.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/1.2.0/xml/features
feature:url-add mvn:org.ops4j.pax.wicket.samples/features/1.2.0/xml/features

Source code

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

Detailed Changelog

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

Bug

  • [PAXWICKET-327] - Pax Wicket breaks when starting wicket and wicket-app at once: IllegalStateException: Filter path was not configured (Http Error 500)
  • [PAXWICKET-348] - Pax Wicket Page factory not working with 1.5
  • [PAXWICKET-370] - Incomplete logging : extender.PaxWicketBundleListener : Bundle {} does not contain any imported packages --> ignore
  • [PAXWICKET-371] - Incredible memory consumption error
  • [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-398] - More than one Filterfactory causes CC Exception

Dependency upgrade

Improvement

  • [PAXWICKET-349] - FilterFactory does not respect the filter lifecycle
  • [PAXWICKET-352] - The documentation is unclear about the meaning of the pax.wicket.applicationname
  • [PAXWICKET-353] - The usage of the PageFactory is unclear
  • [PAXWICKET-355] - Add Eclipse-Source Header to PAX Wicket service source Bundle
  • [PAXWICKET-366] - Bundles not importing org.apache.wicket package, but using Require-Bundle org.ops4j.pax.wicket.service are also relevant
  • [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