Achim,
I have not used Pax Wicket before. I'm a bit more familiar with Felix
but I'll certainly check it out. I was able to get the examples working
once I moved the addition of the osgi-bundlecontext earlier in the
doExecute sequence so I was hoping to understand if it had to occur
following the WebAppBundleContext#start. If this is possible other
Felix users might benefit. It seems like this could impact anyone that
would require the osgi-bundlecontext with an init event (Filter or Servlet).
- Bob Paulin
On 4/10/2014 11:49 PM, Achim Nierbeck wrote:
Have you tried to use Pax Wicket it keeps the pain away in these
scenarios.
Regards, Achim
sent from mobile device
Am 11.04.2014 05:04 schrieb "Bob Paulin" <b...@bobpaulin.com>:
For clarity the init-param exists inside of a filter defined in the
web.xml. Sorry for any confusion.
- Bob Paulin
On 4/10/2014 9:35 PM, Bob Paulin wrote:
Hi,
I was working on building a distribution of Felix 4.4.0 and the Wicket
6.14.0 OSGi example. I noticed that the Wicket OSGi Test Project has an
init-param that looks up the osgi-bundlecontext servlet context attribute.
This does not work because of the order things are initialized in the
JettyService#doExecute method:
1) Get Bundle
2) Start WebAppBundleContext
3) Create Service Properties
4) Register Service
5) Set osgi-bundlecontext Servlet Context
Since Wicket is trying to use the bundle context within the init of a
servlet init class (in step 2) it's NULL at this point in the execution.
I wanted to know if there's a reason we could not execute it in the
following order:
1) Get Bundle
*2) Set osgi-bundlecontext Servlet Context*
3) Start WebAppBundleContext
4) Create Service Properties
5) Register Service
Is there a reason the bundle context could not be available earlier?
Happy to submit a patch and JIRA but I wanted to see if the list had any
insights into the significance of the original ordering.
Thanks,
- Bob Paulin