Quantcast
Channel: SCN : Popular Discussions - Java SDK Application Development
Viewing all articles
Browse latest Browse all 1701

WebIProcessingServer: open Connections

$
0
0

Hi all,

 

My question, I think, regards the relation between 'sessions' in the Java SDK and the 'Open Connections' in the metrics of the WebIntelligenceProcessingServer.

 

We have the following code that runs a WebI document - there are a couple of references to our own code to find the reportID and to handle report prompts, but I think the most important stuff is there. When it is run, the metric 'Open connections' in the WebIProcessingServer increases, and it does not decrease before the 'Idle Connection Timeout (minutes)' has run out.

 

What can we call to close the connection, so that we do not leave connections open, risking to violate the 'Maximum Connections' property in the WebIProcServer?

 

Thanks in advance,

 

/Noah

 

    try {      final ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();      final IEnterpriseSession enterpriseSession = sessionMgr.getSession(principal.getSerializedSession());      final IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("InfoStore");       final MiOpt documentId = getDocumentId(infoStore, documentName.asString());      if (documentId.isNone()) {        throw new McCallException("Could not find the report: " + documentName.asString());       }      final ReportEngines reportEngines = (ReportEngines)enterpriseSession.getService("ReportEngines");       final ReportEngine reportEngine = reportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);      final DocumentInstance documentInstance = reportEngine.openDocument(documentId.get().intValue());      documentInstance.getDataProviders().runQueries();      handlePrompts(documentInstance, reportParameters);      final McFileResource fileResource = getDocumentOuput(documentName, reportName, MeBusinessObjectReportOutputType.translate(reportOutputType) , documentInstance);      @SuppressWarnings("deprecation") final McFileResource resultFileResource = fileResource.setActionType(MeActionType.SHOW);      return resultFileResource;    }    catch (final Exception e) {      throw McReportUtil.handleException(e, principal);    }

Viewing all articles
Browse latest Browse all 1701

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>