Home » Eclipse Projects » Remote Application Platform (RAP) » OSGi shutdown problems
OSGi shutdown problems [message #112484] |
Sat, 15 November 2008 13:23  |
Igor Pavlenko Messages: 24 Registered: July 2009 |
Junior Member |
|
|
Hello
I made a RAP application, and I have to stop the OSGi framework. But I
cannot do this in few cases.
If I start an OSGi Framework and I can stop it. It is fine.
If I start an OSGi Framework and run my application on it - the workbench
of my application will be created. The application works fine. But if I
try to shutdown OSGi - I cannot do this.
If I start an OSGi Framework and run my application and then close the
workbench - there will be no problems with shutting down OSGi.
The problem is that After I create my workbench I have a socket listener
that is suspended:
Thread [SocketListener0-1] (Suspended)
Object.wait(long) line: not available [native method] [local variables
unavailable]
ArrayList<E>(Object).wait() line: 474
UICallBackManager.blockCallBackRequest() line: 187
UICallBackServiceHandler.service() line: 383
ServiceManager$HandlerDispatcher.service() line: 98
RWTDelegate.doPost(HttpServletRequest, HttpServletResponse) line: 63
RequestHandler.service(HttpServletRequest, HttpServletResponse) line: 51
RequestHandler(HttpServlet).service(ServletRequest, ServletResponse)
line: 689
ServletRegistration.handleRequest(HttpServletRequest,
HttpServletResponse, String) line: 90
HttpServiceServlet(ProxyServlet).processAlias(HttpServletReq uest,
HttpServletResponse, String, String) line: 117
HttpServiceServlet(ProxyServlet).service(HttpServletRequest,
HttpServletResponse) line: 59
HttpServiceServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 689
HttpServerManager$InternalHttpServiceServlet.service(Servlet Request,
ServletResponse) line: 269
ServletHolder.handle(ServletRequest, ServletResponse) line: 428
Servlet25Handler(ServletHandler).dispatch(String, HttpServletRequest,
HttpServletResponse, ServletHolder, int) line: 677
Servlet25Handler(ServletHandler).handle(String, String, HttpRequest,
HttpResponse) line: 568
HttpContext.handle(String, String, HttpRequest, HttpResponse) line: 1530
HttpContext.handle(HttpRequest, HttpResponse) line: 1482
HttpServer.service(HttpRequest, HttpResponse) line: 909
HttpConnection.service(HttpRequest, HttpResponse) line: 820
HttpConnection.handleNext() line: 986
HttpConnection.handle() line: 837
SocketListener.handleConnection(Socket) line: 245
SocketListener(ThreadedServer).handle(Object) line: 357
ThreadPool$PoolThread.run() line: 534
You can see in this stack this call:
ServletRegistration.handleRequest(HttpServletRequest, HttpServletResponse,
String) line: 90
But in HttpServiceServlet(ProxyServlet).processAlias(HttpServletReq uest,
HttpServletResponse, String, String) we have
org.eclipse.equinox.http.servlet.internal.Registration instance. For this
instance we call registration.addReference() before calling of
registration.handleRequest and registration.removeReference() after.
So the SocketListener is suspended and the registration.destroy() method
that should be executed when we will try to shutdown OSGi (also if we stop
the application in web container) will be locked.
Could somebody help me, please?
|
|
|
Re: OSGi shutdown problems [message #113159 is a reply to message #112484] |
Sun, 23 November 2008 19:32   |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Igor,
do you explicitly call UICallBack#activate()? In this case you need
to take care that UICallBack#deactivate() is called when the session
terminates.
The code would look like this:
ISessionStore sessionStore = RWT.getSessionStore();
sessionStore.addSessionStoreListener( new SessionStoreListener() {
public void beforeDestroy( SessionStoreEvent event ) {
UICallBack.deactivate( "your-id" );
}
} );
HTH
RĂ¼diger
Igor Pavlenko wrote:
> Hello
>
> I made a RAP application, and I have to stop the OSGi framework. But I
> cannot do this in few cases.
>
> If I start an OSGi Framework and I can stop it. It is fine.
> If I start an OSGi Framework and run my application on it - the
> workbench of my application will be created. The application works fine.
> But if I try to shutdown OSGi - I cannot do this.
>
> If I start an OSGi Framework and run my application and then close the
> workbench - there will be no problems with shutting down OSGi.
>
> The problem is that After I create my workbench I have a socket listener
> that is suspended:
>
> Thread [SocketListener0-1] (Suspended)
> Object.wait(long) line: not available [native method] [local
> variables unavailable]
> ArrayList<E>(Object).wait() line: 474
> UICallBackManager.blockCallBackRequest() line: 187
> UICallBackServiceHandler.service() line: 383
> ServiceManager$HandlerDispatcher.service() line: 98
> RWTDelegate.doPost(HttpServletRequest, HttpServletResponse) line: 63
> RequestHandler.service(HttpServletRequest, HttpServletResponse)
> line: 51
> RequestHandler(HttpServlet).service(ServletRequest, ServletResponse)
> line: 689
> ServletRegistration.handleRequest(HttpServletRequest,
> HttpServletResponse, String) line: 90
> HttpServiceServlet(ProxyServlet).processAlias(HttpServletReq uest,
> HttpServletResponse, String, String) line: 117
> HttpServiceServlet(ProxyServlet).service(HttpServletRequest,
> HttpServletResponse) line: 59
> HttpServiceServlet(HttpServlet).service(ServletRequest,
> ServletResponse) line: 689
> HttpServerManager$InternalHttpServiceServlet.service(Servlet Request,
> ServletResponse) line: 269
> ServletHolder.handle(ServletRequest, ServletResponse) line: 428
> Servlet25Handler(ServletHandler).dispatch(String,
> HttpServletRequest, HttpServletResponse, ServletHolder, int) line: 677
> Servlet25Handler(ServletHandler).handle(String, String, HttpRequest,
> HttpResponse) line: 568
> HttpContext.handle(String, String, HttpRequest, HttpResponse) line:
> 1530
> HttpContext.handle(HttpRequest, HttpResponse) line: 1482
> HttpServer.service(HttpRequest, HttpResponse) line: 909
> HttpConnection.service(HttpRequest, HttpResponse) line: 820
> HttpConnection.handleNext() line: 986
> HttpConnection.handle() line: 837
> SocketListener.handleConnection(Socket) line: 245
> SocketListener(ThreadedServer).handle(Object) line: 357
> ThreadPool$PoolThread.run() line: 534
>
> You can see in this stack this call:
> ServletRegistration.handleRequest(HttpServletRequest,
> HttpServletResponse, String) line: 90
>
> But in HttpServiceServlet(ProxyServlet).processAlias(HttpServletReq uest,
> HttpServletResponse, String, String) we have
> org.eclipse.equinox.http.servlet.internal.Registration instance. For
> this instance we call registration.addReference() before calling of
> registration.handleRequest and registration.removeReference() after.
>
> So the SocketListener is suspended and the registration.destroy() method
> that should be executed when we will try to shutdown OSGi (also if we
> stop the application in web container) will be locked.
>
> Could somebody help me, please?
>
|
|
| |
Goto Forum:
Current Time: Thu Mar 23 09:15:26 GMT 2023
Powered by FUDForum. Page generated in 0.02053 seconds
|