java.lang.Object
com.foursoft.harness.navext.runtime.io.read.XMLReader<VecContent,Identifiable>
com.foursoft.harness.vec.v113.VecReader
A default implementation for a thread local stored VEC 113 reader. Validation events are logged to slf4j.
If a custom event consumer is needed, derive from @
XMLReader
In the past, this reader had a thread local singleton functionality in order to reuse
the reader for repeated reads. This caused memory leaks in environments with thread
pools (e.g. servlet container) as the JVM default Unmarshaller
implementation does not clean up internal states properly after unmarshalling is finished.
Therefore the functionality has been dropped.
The performance overhead of creating a new reader for each read is about 10% - 15% for repeated reads. The overhead is independent from the size of unmarshalled file. If this is an issue, you can manage your own singleton reader (it is not thread-safe, but can be reused).
-
Constructor Details
-
VecReader
public VecReader()Creates a new VEC reader. -
VecReader
Creates a new VEC reader.- Parameters:
validationEventConsumer- a consumer for validation events
-