Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » e4 RAP - Object are never destroyed when closing UISession(How object destruction/garbage collection is triggered ?)
e4 RAP - Object are never destroyed when closing UISession [message #1740384] Fri, 12 August 2016 13:16 Go to next message
Christophe Becavin is currently offline Christophe BecavinFriend
Messages: 60
Registered: April 2011
Location: France
Member
Hello,
I have been running through a memory problem with my Eclipse e4 RAP website. After different user connects to the website there is an Out of memory triggered by the JVM (RAP 3.1 war product deployed on Tomcat8, on CentOS server).

I realised by doing Heap Dump that singleton objects created during the UI session, were not destroyed. Should I trigger their destruction myself ? Or just "null" them ?

I am talking about UISEssion singleton, created using the snippet:
public class MySessionSingleton {
  private MySessionSingleton() {
    // prevent instantiation from outside
  }

  public static MySessionSingleton getInstance() {
    return SingletonUtil.getSessionInstance( MySessionSingleton.class );
  }
  // other methods ...
}


Those singleton are not deleted with the garbage collector triggered ?

EDIT: If I close an MPart myself without closing the session, the objects created in this MPart are destroyed, whereas if I only close the website it does not trigger "preDestroy" of the MPart and keep the objects in the JVM.

[Updated on: Fri, 12 August 2016 13:20]

Report message to a moderator

Re: e4 RAP - Object are never destroyed when closing UISession [message #1740404 is a reply to message #1740384] Fri, 12 August 2016 14:51 Go to previous messageGo to next message
Christophe Becavin is currently offline Christophe BecavinFriend
Messages: 60
Registered: April 2011
Location: France
Member
No Message Body
Re: e4 RAP - Object are never destroyed when closing UISession [message #1740407 is a reply to message #1740404] Fri, 12 August 2016 15:00 Go to previous message
Christophe Becavin is currently offline Christophe BecavinFriend
Messages: 60
Registered: April 2011
Location: France
Member
When I look at the dependencies of the object "Chromosome" which I want to be destroyed (cf figure attached), I can see that :
It has been created inside an MPart, and this one is not destroyed. So the garbage collector by detecting that the object Chromosome IS STILL dependent of the MPart, it will not be tagged for the garbage collector, and will not be destroyed.

A walkthrough would be to close programmattically all MPart, and MWindow.
I am running :
RWT.getUISession().addUISessionListener( new UISessionListener() {
     public void beforeDestroy( UISessionEvent event ) {
          for(MPart part : partService.getParts()){
                partService.hidePart(part);
          }
     }
}


But it is not closing the MPart. Any idea ?
Previous Topic:UIForms MessageManager/ControlDecorator throws Widget is disposed exception
Next Topic:[RAP 2.3] theme not working with WAR file
Goto Forum:
  


Current Time: Fri May 25 09:25:44 GMT 2018

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

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

Back to the top