Found in latest trunk a class org.apache.kahadb.util.LockFile with lock method which I think is first one to make use of the data directory, and it will create all directories specified in data directory path.
Maybe additional configuration parameter, createBaseDataDirectory, could be added. It could default to true for backward compatibility, but when that parameter is false lock method should check if data directory exists, and if it doesn't lock should throw IOException that it can not acquire lock since data directory does not exist and AMQ is configured not to auto-create it. Does this proposal make sense to others? Regards, Stevo. On Tue, Dec 13, 2011 at 12:01 PM, Stevo Slavić <[email protected]> wrote: > Hello ActiveMQ community, > > Is there a way to configure ActiveMQ not to create data directory base > structure? Most specifically for KahaDB persistence. > > It's fine if it created subdirectories (if any needed) within existing > data directory base, but I'd like to prevent it from creating data > directory base structure. > > Using master-slave setup with shared disk storage, and shared disk storage > gets unmounted, but ActiveMQ master recreates directory structure on local > file-system and continues working with fresh storage while it was expected > to shutdown immediately since it should have lost exclusive lock. > > Regards, > Stevo. >
