I get the wrong service reference [message #494953] |
Tue, 03 November 2009 11:27 |
exquisitus 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
|
|
|
Powered by
FUDForum. Page generated in 0.02867 seconds