-
Notifications
You must be signed in to change notification settings - Fork 295
Osgi
The OSGi Integration Project lets you use Wicket in OSGi environments. It provides alternative variants of the main Wicket artifacts as OSGi bundles and some additional glue code to let your Wicket components and applications interact with the OSGi service registry.
The wicket-osgi module or bundle provides the following entry points:
-
OsgiWebApplicationFactorysupports bootstrapping aWebApplicationfrom the OSGi service registry, matching a property value specified as aWicketFilterinit parameter inweb.xml. -
OsgiClassResolversupports Wicket page deserialization. -
OsgiComponentInjector lets you inject OSGi services into WIcket components by annotating fields with JSR-330 @Inject.
wicket-osgi depends on two other Wicketstuff subprojects:
-
wicket-bundle, the all-in-one OSGi-compliant packaging of Wicket, now has a revised manifest without dynamic imports. -
wicket-ioc-bundle(sibling ofwicket-bundle) does the same forwicket-ioc, which is required by wicket-osgi.
-
wicket-osgi-test-webandwicket-osgi-test-serviceare two simple test bundles for testing the glue code in an OSGi web container (Pax Web). The sample uses Aries Blueprint to interact with the service registry, but of course you can also use Declarative Services or aBundleActivatorto publish your services.
- cd wicketstuff-core/jdk-1.5-parent/wicket-osgi-parent/wicket-osgi-test-web
- mvn install pax:run
- Open http://localhost:8080/library in your browser.
To use wicket-osgi in your own projects, have a look at web.xml and LibraryApplication.java in wicket-osgi-test-web, and at the Javadoc in wicket-osgi.