aspose file tools
The moose likes Other Application Frameworks and the fly likes OSGi - Embedded Jetty Server - Servlet unable to get reference to Service Tracker Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "OSGi - Embedded Jetty Server - Servlet unable to get reference to Service Tracker" Watch "OSGi - Embedded Jetty Server - Servlet unable to get reference to Service Tracker" New topic
Author

OSGi - Embedded Jetty Server - Servlet unable to get reference to Service Tracker

Krem Reid
Greenhorn

Joined: Sep 07, 2009
Posts: 28
Hi

I have an OSGi application that has a GWT web interface.

One of the bundles is a GWT bundle that needs to be compiled before the application is launched.

Another bundle is an embedded Jetty application server. It starts the server and points to the compiled WAR of the GWT bundle



This works perfect and my GWT is available and it is able to call servlets.

The problem is these Servlets are unable to get a reference to the OSGi container. From what I have read in the init method you can get a reference to a ServiceTracker



I have no idea where this osgi-bundlecontext is meant to be set in Jetty.

Any ideas?

Thanks






Backlink Service - High PageRank Backlinks to have you flying up through the SERP
Krem Reid
Greenhorn

Joined: Sep 07, 2009
Posts: 28
and as soon as I finally post an question I work out the answer

I don't know if this is the best way to do it but it works




Wish I had of posted a question 3 days ago

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: OSGi - Embedded Jetty Server - Servlet unable to get reference to Service Tracker
 
Similar Threads
Sweet spot of Spring-DM compared to other implementations?
Help me to fix this code
OSGi and Spring DM: Enterprise Beans, JEE Containers and WEB UI
deploying web app progmatically in jetty
problem with the jetty embedded server.