Hello, I have a standalone server generating reports using jasperreports.
The server is supposed to generate about 10000-15000 reports per day. But after a few hours ( I cannot exactly tell the number of reports done till then ) the reports are no longer printed. At the same time, other processes, doing normal windows printing, stop printing too. When I restart the server running jasperreports, all printing works ok again. I assume that the jasperreport server consumes some printer resources so that the printer system ultimately comes to a stop. Not being a windows expert, I don't have any idea what kind of resource this could be and how these resources could be freed. Here is the code segment of my jasperreport server doing the actual printing. As you can see, a filled in JasperPrint object and a printer name is passed in: private void printReport ( JasperPrint jasperPrint, String printerName ) throws JRException { PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet (); printRequestAttributeSet.add (MediaSizeName.ISO_A4); PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet (); printServiceAttributeSet.add(new PrinterName(printerName, null)); //printServiceAttributeSet.add(new PrinterName("HP LaserJet 4P", null)); JRPrintServiceExporter exporter = new JRPrintServiceExporter (); exporter.setParameter (JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter (JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet); exporter.setParameter (JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, printServiceAttributeSet); exporter.setParameter (JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE); exporter.setParameter (JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.FALSE); exporter.exportReport (); } Should I do some cleanup on the exporter object? I welcome any suggestions. Thanks and kind regards Christoph ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions