RE: How to make a bean thread safe?

2021-11-08 Thread Mikael Andersson Wigander
I think I know now what's going on. The XPathBuilder.class is using a pool to store all @XPath() expressions and it keeps adds to the pool but it never clears the pool. In class there's a method doStop() which runs pool.clear() and poolLogNamespaces.clear(); but it is never called, afai

RE: How to make a bean thread safe?

2021-11-08 Thread Mikael Andersson Wigander
Hi I see what you mean but still there must be a leak somewhere… The payload is small DE000C3JALS0 EAA3 SI 20211220 CS EEX/EUAA P AUCTION SPOT ITNXXX EUR false 529900J0JGLSFDWNFC20 XEER false 2015-03-25T06:00:00Z 2031-12-30T23:59:59Z 500 ENVR EMIS EUAA OTHR EXOF DE 2021-03-18

RE: How to make a bean thread safe?

2021-11-08 Thread Siano, Stephan
Hi I don’t think that this issue is related to thread safety. XPath as such is a very expensive operation as it requires parsing the document into a DOM. You have 10 of those XPath parameters and the heap dump shows 10 XPath builders that are consuming a lot of memory. You’d probably better pas

Sv: How to make a bean thread safe?

2021-11-08 Thread Mikael Andersson Wigander
There’s a typo in the code sample. The processing SHOULD be parallel, not sequential as in the snippet. /M På mån, nov. 8, 2021 vid 20:11, Mikael Andersson Wigander skrev: HiWith the risk of being seen as a n00b (again)…We are processing large XML files

How to make a bean thread safe?

2021-11-08 Thread Mikael Andersson Wigander
Hi With the risk of being seen as a n00b (again)… We are processing large XML files (0.5GB/~500.000 records). To process them we use stream caching, spit, parallel processing, xpath and a bean. We get a lot of OutOfMemoryExceptions and after analysing we see that the call to the bean method is