I need a utility class which only has to generate a relatively complex file from a given input. The input differs, the process of generating the file is always the same.
Now the question: Would it be better to use an @ApplicationScoped bean or just a class using the Singleton Pattern and work with static methods?
As far as i know both classes are only instatiated once per JVM and also kept in memory only once. I do not need an inject, the singleton would work fine. Are there any advantages for my performance or the memory usage using one of the listed possibilites?