Search code examples
mulepersistent-object-store

Mule - how long does SimpleMemoryObjectStore last?


This is my use case: I want to store a flag and this flag should persist until the app is restarted. For example, if the app is crashed I want that flag to be reset.

Do you think if using SimpleMemoryObjectStore with persistent being false will work?


Solution

  • SimpleMemoryObjectStore is not persistent by default:

    @Override
    26    public boolean More ...isPersistent()
    27    {
    28        return false;
    29    }
    

    So if the server is restarted, the value will be lost.