Changeset 25412

Show
Ignore:
Timestamp:
18.04.2012 10:43:19 (8 years ago)
Author:
jmt12
Message:

Adding in required cpp code for TDBServer support (using existing TDB interactions - we don't actually support the runtime in a distributed environment... yet)

Location:
gs2-extensions/tdb-edit/trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/disable_tdb.sh

    r25251 r25412  
    3737sed -i '/^#include "tdbclass.h" \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
    3838sed -i '/^if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
     39sed -i '/^if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} \/\/TDBServer/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
    3940# - collectserver.cpp 
    4041sed -i '/^if (infodbtype == "tdb") { } \/\/ TDB Do nothing/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
     42sed -i '/^if (infodbtype == "tdbserver") { } \/\/ TDBServer Do nothing/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp 
    4143# - Remove compiled files 
    4244rm -f $GSDLHOME/runtime-src/src/colservr/gsdlcolservr.a 
  • gs2-extensions/tdb-edit/trunk/src/enable_tdb.sh

    r25408 r25412  
    8282  then 
    8383    sed -i 's:collectset\:\:collectset (text_t& gsdlhome, text_t& collecthome):// @EXTENSION HEADERS@\n#include "tdbclass.h //TDB\n\n&:' ${SRCFILE} 
    84     sed -i 's:    // Use GDBM if the infodb type is empty or not one of the values above:    // @EXTENSION DATASOURCES@\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n\n&:' ${SRCFILE} 
     84    sed -i 's:    // Use GDBM if the infodb type is empty or not one of the values above:    // @EXTENSION DATASOURCES@\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer\n\n&:' ${SRCFILE} 
    8585  else 
    8686    sed -i 's:// @EXTENSION HEADERS@:&\n#include "tdbclass.h" //TDB:' ${SRCFILE} 
    87     sed -i 's:// @EXTENSION DATASOURCES@:&\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB:' ${SRCFILE} 
     87    sed -i 's:// @EXTENSION DATASOURCES@:&\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer:' ${SRCFILE} 
    8888  fi 
    8989fi 
     
    106106  if [ $? -eq 1 ] 
    107107  then 
    108     sed -i 's:  if (infodbtype=="gdbm") {:  // @EXTENSION DATASOURCES@\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n\n&:' ${SRCFILE} 
     108    sed -i 's:  if (infodbtype=="gdbm") {:  // @EXTENSION DATASOURCES@\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing\n\n&:' ${SRCFILE} 
    109109  else 
    110     sed -i 's:  // @EXTENSION DATASOURCES@:&\n  if (infodbtype == "tdb") { return; } // TDB Do nothing:' ${SRCFILE} 
     110    sed -i 's:  // @EXTENSION DATASOURCES@:&\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing:' ${SRCFILE} 
    111111  fi 
    112112fi