Samples :: Pluggable Storage

Pluggable Storage Sample

Description

Pluggable session storage allows to customize completely the persistence of a session state and messages.

The following interfaces should be implemented:

biz.onixs.fix.engine.storage.SessionStorage

and

biz.onixs.fix.engine.storage.StorageRepository

Please see MyStorageRepository and MySessionStorage implementations. The custom storage just stores the messages into maps.

After implementing above mentioned interfaces instance of the implemented storage repository should be registered in storage repository manager using the following method (please see in PluggableStorageSample):

biz.onixs.fix.engine.storage.StorageRepositoryManager.register(String, StorageRepository)

Then session with corresponding storage type can be created.

Sample also contains StoragePertMeter which illustrates how the performance of a session storage can be measured. The sample measures the performance of File Based Session Storage.

Usage

  • Run the sample:
    • win: PluggableStorageSample.bat
    • linux: PluggableStorageSample.sh
  • Clean everything:
    • win: clean.bat
    • linux: clean.sh