What do you mean "create a new file on Journal" ?
a new File Handler. reuse the same file though.
I don't see how this is related to the journal.
There are two implementations to LargeMessage:
When I said on Null Persistence, and on Journal, I was referring to those implementations individually.
the JournalLargeServerMessage is just the LargeMessage used when using the Journal. In fact it just uses a file.
A simple fix, would be to create a method called cloneForDeliver on the LargeMessage interface, and use it on the ServerConsumer::LargeMessageDeliverer. This way we could reuse the same buffer on NullPersistence, and create a new file on Journal.
Thats similar to what i am doing. when large messages are encoded i pass round an encoding context, this context takes care of making a copy of SequentialFile (i.e. with a different file handle) and the large message encode method encodes using the context. Doing it this way i may be able to get rid of separate encode methods for normal messages and large messages, simplifying things.