I want to be close the cube and release the memory used by the query. I can remove the session attributes for the query. Is this enough or is there a better way?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a bit odd. If you remove the OlapModel from the session, it will receive a "destroy" event and clean up all DB connections etc. But some GUI components like table and chart will still reference the removed OlapModel.
The best would be to set a new OlapModel via the static OlapModelProxy.setOlapModel(), which will fire a ModelChangeEvent in return to the GUI components like table, chart etc. If no new model is there you could set an com.tonbeller.jpivot.olap.model.impl.Empty.EMPTY_MODEL.
This way the GUI components will still have something to display. The alternative would be to remove the GUI components together with the olap model.
Andreas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to be close the cube and release the memory used by the query. I can remove the session attributes for the query. Is this enough or is there a better way?
This is a bit odd. If you remove the OlapModel from the session, it will receive a "destroy" event and clean up all DB connections etc. But some GUI components like table and chart will still reference the removed OlapModel.
The best would be to set a new OlapModel via the static OlapModelProxy.setOlapModel(), which will fire a ModelChangeEvent in return to the GUI components like table, chart etc. If no new model is there you could set an com.tonbeller.jpivot.olap.model.impl.Empty.EMPTY_MODEL.
This way the GUI components will still have something to display. The alternative would be to remove the GUI components together with the olap model.
Andreas