Ejemplo n.º 1
0
  public void start(BundleContext bundleContext) throws Exception {
    // to mount in root context use "/" instead. Please keep in mind that if you change this value
    // you also have to
    // update the stylesheet link in the OverviewPage.html. E.g. if you change the mount point here
    // to / you have to
    // change deptStore/stylesheets/style.css in OverviewPage.html to stylesheets/style.css
    String mountPoint = "deptStore";
    String applicationName = "departmentstore";
    store = new RootContentAggregator(bundleContext, applicationName, "swp");
    store.register();

    overviewPageFactory =
        new OverviewPageFactory(bundleContext, store, applicationName, "overview");
    overviewPageFactory.register();

    // Creating a Wicket Application you've two options:
    // a) etiher create the WicketApplicationFactory yourself or...
    // createPaxWicketApplicationFactoryUsingOwnWicketApplication(bundleContext, mountPoint,
    // applicationName);
    // b) ... let pax-wicket do all the work.
    createPaxWicketApplicationFactoryPaxWicketDoingTheWork(
        bundleContext, mountPoint, applicationName);

    // This registers the pax-wicket service as OSGi Service.
    serviceRegistration = applicationFactory.register();
  }
Ejemplo n.º 2
0
 public void stop(BundleContext bundleContext) throws Exception {
   serviceRegistration.unregister();
   overviewPageFactory.dispose();
   store.dispose();
   applicationFactory.dispose();
 }