Selecting a LockStore Implementation
TxCore comes with support for several different object store implementations. If the object model being used is SINGLE, then no lock store is required for maintaining locks, since the information about the object is not exported from it. However, if the MULTIPLE model is used, then different run-time environments (processes, Java virtual machines) may need to share concurrency control information. The implementation type of the lock store to use can be specified for all objects within a given execution environment using the TxojEnvironmentBean.lockStoreType property variable. Currently this can have one of the following values: BasicLockStore This is an in-memory implementation which does not, by default, allow sharing of stored information between execution environments. The application programmer is responsible for sharing the store information. BasicPersistentLockStore This is the default implementation, and stores locking information within the local file system. Therefore execution environments that share the same file store can share concurrency control information. The root of the file system into which locking information is written is the LockStore directory within the TxCore installation directory. You can override this at runtime by setting the TxojEnvironmentBean.lockStoreDir property variable accordingly, or placing the location within the CLASSPATH. java -D TxojEnvironmentBean.lockStoreDir=/var/tmp/LockStore myprogram java –classpath $CLASSPATH;/var/tmp/LockStore myprogram If neither of these approaches is taken, then the default location will be at the same level as the etc directory of the installation.