The Journal service will accept as addRecord() arguments either the data already formatted, or a context and a format name, or a context and a format object. In the last two cases, the service will call the format() method of the format object to build the journal record.
The last record number is maintained by the journal object in a private instance variable or from control table. It is initialized in the open() method and increased by one after each successful add operation. The addMethod() returns this last record number, which can then be used to update or retrieve the last record for the current journal, meaning the last record added to the journal table that has been assigned for the current journaling date to a specific entity. Note that an entity can group a number of applications working with the same journal service instance and then access one journal table. In this case, the record number specific to an application will not correspond with the last record in the current journal but with the last record this application has added. In cluster environment, please set recIdFromTable=true in xml and do not use the returned integer and the performance will be a little slower.