public final class VecReader extends XMLReader<VecContent,Identifiable>
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

      public VecReader(Consumer<jakarta.xml.bind.ValidationEvent> validationEventConsumer)
      Creates a new VEC reader.
      Parameters:
      validationEventConsumer - a consumer for validation events