Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/BuilderPool.java @ 9726:0a5239a1e46e 3.2.x
Upgrade to Log4j 2
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 02 Mar 2022 10:26:50 +0100 |
parents | 5e38e2924c07 |
children |
comparison
equal
deleted
inserted
replaced
9725:da398790fa32 | 9726:0a5239a1e46e |
---|---|
17 | 17 |
18 import javax.xml.parsers.DocumentBuilder; | 18 import javax.xml.parsers.DocumentBuilder; |
19 import javax.xml.parsers.DocumentBuilderFactory; | 19 import javax.xml.parsers.DocumentBuilderFactory; |
20 import javax.xml.parsers.ParserConfigurationException; | 20 import javax.xml.parsers.ParserConfigurationException; |
21 | 21 |
22 import org.apache.log4j.Logger; | 22 import org.apache.logging.log4j.Logger; |
23 import org.apache.logging.log4j.LogManager; | |
23 | 24 |
24 import org.w3c.dom.Document; | 25 import org.w3c.dom.Document; |
25 import org.w3c.dom.Node; | 26 import org.w3c.dom.Node; |
26 | 27 |
27 /** A little round robin pool of builders to mitigate | 28 /** A little round robin pool of builders to mitigate |
28 * the fact the XML DOM documents are not thread safe. | 29 * the fact the XML DOM documents are not thread safe. |
29 */ | 30 */ |
30 public class BuilderPool | 31 public class BuilderPool |
31 { | 32 { |
32 private static Logger log = Logger.getLogger(BuilderPool.class); | 33 private static Logger log = LogManager.getLogger(BuilderPool.class); |
33 | 34 |
34 private static final int DEFAULT_POOL_SIZE = 4; | 35 private static final int DEFAULT_POOL_SIZE = 4; |
35 | 36 |
36 private static final int POOL_SIZE = Math.max( | 37 private static final int POOL_SIZE = Math.max( |
37 Integer.getInteger("flys.datacage.pool.size", DEFAULT_POOL_SIZE), 1); | 38 Integer.getInteger("flys.datacage.pool.size", DEFAULT_POOL_SIZE), 1); |