Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » I get the wrong service reference
I get the wrong service reference [message #494953] Tue, 03 November 2009 11:27
exquisitus is currently offline exquisitusFriend
Messages: 211
Registered: July 2009
Senior Member
Hi Guys,
I try to work with de JSP Feature of Pax-Web....in order to get the
WebContainer I should do this:

public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
m_webContainerRef =
context.getServiceReference(WebContainer.class.getName());
if( m_webContainerRef != null )
{
final WebContainer webContainer = (WebContainer)
context.getService( m_webContainerRef );


But this results in a ClassCastException....because I try to cast a
HttpServiceProxy to the WebContainer.

The ServiceReference I get has the following SysOut:
"{org.osgi.service.http.HttpService,
org.ops4j.pax.web.service.WebContainer}..."

The context seems to find two Elements registered. How can I get the
second one ? Or how to avoid that the first one even exists ?

Thx for help
Previous Topic:Drag&Drop with unknown source
Next Topic:Starting OSGI Bundles while executing a RCP App
Goto Forum:
  


Current Time: Fri Nov 28 17:24:11 GMT 2014

Powered by FUDForum. Page generated in 0.01868 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software