Logger logger = Logger.getLogger(this.getClass());
logger.debug("Entering service method");
// retrieves analysis information from session
HttpSession session = request.getSession();
OlapModel olapModel = (OlapModel) session.getAttribute("query01");
ChartComponent chart = (ChartComponent) session.getAttribute("chart01");
TableComponent table = (TableComponent) session.getAttribute("table01");
AnalysisBean analysis = (AnalysisBean) session.getAttribute("analysisBean");
analysis = AnalysisAdapterUtil.createAnalysisBean(analysis.getConnectionName(), analysis.getCatalogUri(),
chart, table, olapModel);
// stores current analysis information on session
session.setAttribute("analysisBean", analysis);
// retrieves Mondrian connection
ScriptableMondrianDrillThrough smdt = (ScriptableMondrianDrillThrough) olapModel.getExtension("drillThrough");
Connection mondrianConnection = smdt.getConnection();
// retrieves CacheControl object
CacheControl cacheControl = mondrianConnection.getCacheControl(null);
// retrieves the MDX query
MdxQuery mdxQuery = (MdxQuery) olapModel.getExtension("mdxQuery");
Query mondrianQuery = mondrianConnection.parseQuery(mdxQuery.getMdxQuery());
// finds the cube in the MDX query
Cube cube = mondrianQuery.getCube();
// flush cache on all measures for that cube
CacheControl.CellRegion measuresRegion = cacheControl.createMeasuresRegion(cube);