From 2911310d53628b69c6dadbedc1d0abf33efb4cc2 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 15 Jul 2014 18:51:28 +0200 Subject: Web Helper and Config --- .../main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java index ce51515e..a5232acf 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java @@ -120,16 +120,20 @@ public class PdfAsHelper { private static ObjectFactory of = new ObjectFactory(); static { - logger.info("Creating PDF-AS"); - pdfAs = PdfAsFactory.createPdfAs(new File(WebConfiguration - .getPdfASDir())); - logger.info("Creating PDF-AS done"); + reloadConfig(); } public static void init() { logger.info("PDF-AS Helper initialized"); } + public static synchronized void reloadConfig() { + logger.info("Creating PDF-AS"); + pdfAs = PdfAsFactory.createPdfAs(new File(WebConfiguration + .getPdfASDir())); + logger.info("Creating PDF-AS done"); + } + private static void validatePdfSize(HttpServletRequest request, HttpServletResponse response, byte[] pdfData) throws PdfAsWebException { -- cgit v1.2.3