[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [virgo-dev] Virgo Snaps Question
|
Hi,
On 3 November 2010 01:09, <pphelan@xxxxxxxx> wrote:
> Hi,
> I was wondering if anyone has used applicationContext.xml within a snap.
> I have been trying to pull in some OSGI services to be autowired to my
> MVC controller in a snap but it doesn't appear to be finding the OSGi
> service when it trys to create the controller.
>
> Just curious if it is just me or if anyone else has tried this.
Not sure if related, I noticed a bug that for a web bundle two
application contexts exist, one empty and a 'good' one. Depending on
how the context is looked up the snaps might see the wrong one. I did
not get to making a demo project and logging it yet (and make sure
it's not something in our web bundle) so this may be our own doing.
For a web bundle this gives two references in our Wicket glue:
ServiceReference[] references =
bundleContext.getAllServiceReferences(ApplicationContext.class.getName(),
"(org.springframework.context.service.name=my.web.bundle)");
I more or less suspect the issue is in
ServerOsgiBundleXmlWebApplicationContext's constructors.
Cheers,
Ric