Resin 3.1.5 includes Wicket plugins to support full WebBeans (JSR-299) integration for the Wicket application object, and dependency injection for component objects.

The Application object can use the following capabilities:

The components get @In and @Named injection, but not the other capabilities, since interception conflicts with the Wicket style of allowing components to use "new" for easy instantiation.

The three plugin classes are

The application factory is configured in Wicket's <filter> definition as the applicationFactoryClassName. The sample WEB-INF/resin-web.xml might look like the following:

  <web-app xmlns="http://caucho.com/ns/resin">

    <filter filter-name="wicket"
               filter-class="org.apache.wicket.protocol.http.WicketFilter">
      <init-param 
            applicationClassName="demo.HelloWorldApplication"
            applicationFactoryClassName="com.caucho.wicket.ResinApplicationFactory"/>
    </filter>

    <filter-mapping url-pattern="/*" filter-name="wicket"/>

</web-app>

The component injector is registered with your Application object and looks like the following:

import com.caucho.wicket.*;

public MyApplication extends WebApplication {
  public MyApplication()
  {
    addComponentInstantiationListener(new ResinComponentInjector());
  }

  ...
}

The Resin wiki page at http://wiki.caucho.com/Wicket also provides an up-to-date documentation of the integration.

Resin 3.1.5 includes Wicket plugins to support full WebBeans (JSR-299) integration for the Wicket application object, and dependency injection for component objects.

The Application object can use the following capabilities:

The components get @In and @Named injection, but not the other capabilities, since interception conflicts with the Wicket style of allowing components to use "new" for easy instantiation.

The three plugin classes are

The application factory is configured in Wicket's <filter> definition as the applicationFactoryClassName. The sample WEB-INF/resin-web.xml might look like the following:

  <web-app xmlns="http://caucho.com/ns/resin">

    <filter filter-name="wicket"
               filter-class="org.apache.wicket.protocol.http.WicketFilter">
      <init-param 
            applicationClassName="demo.HelloWorldApplication"
            applicationFactoryClassName="com.caucho.wicket.ResinApplicationFactory"/>
    </filter>

    <filter-mapping url-pattern="/*" filter-name="wicket"/>

</web-app>

The component injector is registered with your Application object and looks like the following:

import com.caucho.wicket.*;

public MyApplication extends WebApplication {
  public MyApplication()
  {
    addComponentInstantiationListener(new ResinComponentInjector());
  }

  ...
}

The Resin wiki page at http://wiki.caucho.com/Wicket also provides an up-to-date documentation of the integration.

(I'd meant to put this under the integration guides section, not a top-level page, but I don't seem to have the permissions to move it.)