I am new to vaadin. We have a UI application which queries webservice , gets a response from webservice as an xml , we parse that xml and create dto pbject list from that and set those dto objects on vaadin Table . Under load test when we send traffic to accees the application using a traffic tool , I observed memory leak as the strings associated to vaadin table are not getting garbage collected .
Please help me here , Am i doing anything wrong in binding the data? ,
Table table = new Table()
Object ob = new Object
{ informationList.get(i).getCheckoutSource(),
informationList.get(i).getRoleName(),
informationList.get(i).getRolePhoneNumber(),
informationList.get(i).getLastName(),
informationList.get(i).getFirstName(),
informationList.get(i).getUserPhoneNumber(),
informationList.get(i).getAssetStateChangeTime() };
table.addItem(ob,
new Integer(i));
Do you later on remove the items using removeItem() and then add new items? There was a memory leak bug related to removeItem fixed earlier this week (#6212) so try the latest 6.5 nightly and see if it helps.
I get a webservice response , after parsing that response xml I create dtos and those dtos added to the list sent back to UI , On the UI I iterate the list and set the items on the vaadin Table to display in tabular form
The code is
List informationList = service.
.getAssociationInformation();
for (int i = 0; i < informationList.size(); i++) {
table.addItem(
new Object { informationList.get(i).getCheckoutSource(),
informationList.get(i).getRoleName(),
informationList.get(i).getRolePhoneNumber(),
informationList.get(i).getLastName(),
informationList.get(i).getFirstName(),
informationList.get(i).getUserPhoneNumber(),
informationList.get(i).getAssetStateChangeTime() },
new Integer(i));
This loading of the data is not on any event , the data is loaded in table as soon as the page is requested or loaded . I think after the page load the binding of the table remain intact and the objects are not garbage collected .This is breaking my application under heavy load with out of memory exceptions.
Any help is appreciated , as I am stuck with this issue for sometime now
p.s. On every page load I am creating new instance of Table so table.removeAll() will not have any effect.
How do you store your table? In what method is the code snippet you pasted run? What do you mean exactly by that you create a new instance on each page load? Are you sure you are not keeping references to old tables?
In what method is the code snippet you pasted run?
–>This code is present in a local method displayTableContent() which is called from init()
What do you mean exactly by that you create a new instance on each page load?
→ For every new request new instance of UI class is created and in turn a new Table is created
Are you sure you are not keeping references to old tables?
→ No I am not