I've come across several situations over the past few months where the services that I'm creating need to save their state before shutting down, and the restore their state when starting up. In most cases the state is none-trivial, so I've been using a database. But, there are some cases where all that needs to be stored are simple strings and numbers, and it would be over-kill to force this information into a database or other remote storage mechanism.
What I would really like to do is find a safe location in the servicemix directory structure to write this data to a file. Preferably this location would be directly associated with the component that an endpoint is defined on, so I've been looking at the "data\jbi\*component-name*\workspace" directory. I'm aware that this directory path can be obtained from the context.getWorkspaceRoot() method, but I'm not really certain that this is what I *should* be doing. I'd appreciate feedback on whether or not this is a wise choice. Alternatives would also be greatly appreciated. Thanks. Bill -- View this message in context: http://old.nabble.com/Saving-and-restoring-an-Endpoint%27s-state-tp26972895p26972895.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
