mco_runtime_start_ex

Dynamically load the specified libraries and start the database runtime.

Prototype

    MCO_RET mco_runtime_start_ex(mco_bool disk,
                    mco_bool mvcc,
                    mco_bool shmem,
                    const char *sync_library,
                    const char *memory_library,
                    const char *runtime_path);

Arguments

disk
Set true to dynamically load the appropriate persistent database libraries.
mvcc
Set true to dynamically load the MVCC transaction manager library; otherwise load the MURSIW library.
shmem
Set true to dynamically load the shared memory library; otherwise load the conventional memory library.
sync_library
If non null, load the synchronization library from the specified file and path.
memory_library
If non null, load the memory library from the specified file and path.
runtime_path
If non null, load the runtime library from the specified file and path.

Description

This function calls mco_core_load() to load the appropriate dynamic libraries according to the specified parameters. Then it starts the eXtremeDB runtime with the same operations as mco_runtime_start().

Return Codes

MCO_S_OK
The database was created successfully.
MCO_E_SHM_ERROR
Failed to allocate shared memory. (If using a shared memory database.)

Example

The following code snippet would dynamically load the disk manager, the MURSIW transaction manager, and conventional memory libraries:

    Application snippet:

    int main(int argc, char* argv[])
    {
        mco_db_h    db;
        MCO_RET     rc;
        mco_device_t       dev;
        mco_db_params_t    db_params;

        if((rc = mco_runtime_start_ex(true, false, false, NULL, NULL, NULL)) != MCO_S_OK)

            exit(-1);

        ...
        mco_runtime_stop();
    }