You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/02/16 17:10:57 UTC

svn commit: r378287 - in /incubator/tuscany/cpp/sca: ./ runtime/core/src/tuscany/sca/core/ runtime/core/test/src/ samples/runtime/ samples/runtime/modules/ samples/runtime/subsystems/

Author: robbinspg
Date: Thu Feb 16 08:10:53 2006
New Revision: 378287

URL: http://svn.apache.org/viewcvs?rev=378287&view=rev
Log:
Rename SCA environment variables

Removed:
    incubator/tuscany/cpp/sca/samples/runtime/modules/readme.txt
    incubator/tuscany/cpp/sca/samples/runtime/readme.txt
    incubator/tuscany/cpp/sca/samples/runtime/subsystems/readme.txt
Modified:
    incubator/tuscany/cpp/sca/Developers Guide.txt
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp
    incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp
    incubator/tuscany/cpp/sca/scatest.sh

Modified: incubator/tuscany/cpp/sca/Developers Guide.txt
URL: http://svn.apache.org/viewcvs/incubator/tuscany/cpp/sca/Developers%20Guide.txt?rev=378287&r1=378286&r2=378287&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/Developers Guide.txt (original)
+++ incubator/tuscany/cpp/sca/Developers Guide.txt Thu Feb 16 08:10:53 2006
@@ -41,45 +41,28 @@
 
 If  <root_dir> is the directory that tuscany_cpp.tar.gz is untarred into. 
 
-- export SDO4CPP=<root_dir>/tuscany/cpp/sdo
-- export SCA4CPP=<root_dir>/tuscany/cpp/sca
-- export SCA4CPP_HOME=<root_dir>/tuscany/cpp/sca
+- export TUSCANY_SDOCPP=<root_dir>/tuscany/cpp/sdo
 
 Build:
-- cd $SCA4CPP_HOME/runtime/core/src/Debug
-- make
+- cd <root_dir>tuscany/cpp/sca
+- ./build.sh
 
 Install:
-- copy headers: cp $SCA4CPP_HOME/runtime/core/src/osoa/sca/*.h $SCA4CPP/include
-- copy lib:     cp libtuscany_sca.so $SCA4CPP/lib 
+- installed in <root_dir>tuscany/cpp/sca by build step
 
 SCA For C++ Build Verification Test
 ----------------------------------- 
 
-Build:
-- cd $SCA4CPP_HOME/runtime/core/test/CustomerInfo/Debug
-- make
-- cd $SCA4CPP_HOME/runtime/core/test/MyValue/Debug
-- make
-- cd $SCA4CPP_HOME/runtime/core/test/src/Debug
-- make
-
-Deploy:
-- cp $SCA4CPP_HOME/runtime/core/test/MyValue/Debug/libMyValue.so $SCA4CPP_HOME/runtime/core/test/testSCASystem/modules/MyValueServiceModule
-- cp $SCA4CPP_HOME/runtime/core/test/CustomerInfo/Debug/libCustomerInfo.so $SCA4CPP_HOME/runtime/core/test/testSCASystem/modules/MyValueServiceModule
-
-Environment:
-- export LD_LIBRARY_PATH=$SCA4CPP/lib:$LD_LIBRARY_PATH:<xerces_deploy>/lib
-- export SCA4CPP_SYSTEM_ROOT=$SCA4CPP_HOME/runtime/core/test/testSCASystem
-- export SCA4CPP_DEFAULT_MODULE=SubSystem1
+Built and inastalled by build step above
 
 Run:
-- cd $SCA4CPP_HOME/runtime/core/test/src
-- Debug/tuscany_sca_test
+- ./scatest.sh
 
 
 Building the tools
 ------------------
+
+NOTE: this is built and installed by the build step above.
 
 Currently, there is only one tool: "scagen". It can be built using the
 ant build script at \tuscany\cpp\sca\tools\scagen\build.xml. 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp
URL: http://svn.apache.org/viewcvs/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp?rev=378287&r1=378286&r2=378287&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp Thu Feb 16 08:10:53 2006
@@ -35,7 +35,14 @@
 {
     namespace sca
     {
-
+        /** 
+         * Environment variable names
+         */
+        static const char* TUSCANY_SCACPP = "TUSCANY_SCACPP";
+        static const char* TUSCANY_SCACPP_SYSTEM_ROOT = "TUSCANY_SCACPP_SYSTEM_ROOT";
+        static const char* TUSCANY_SCACPP_DEFAULT_MODULE = "TUSCANY_SCACPP_DEFAULT_MODULE";
+            
+ 
         // ==========================================================
         // Initialize static class member to not pointing at anything
         // ==========================================================
@@ -52,10 +59,12 @@
             
             // Locate the SCA install root
             char*  root = 0;
-            root = getenv("SCA4CPP");
+            root = getenv(TUSCANY_SCACPP);
             if (root == 0)
             {
-                throw SystemConfigurationException("SCA4CPP environment variable not set");
+            	string msg = TUSCANY_SCACPP;
+            	msg += " environment variable not set";
+                throw SystemConfigurationException(msg.c_str());
             }
             else
             {
@@ -78,11 +87,13 @@
                 instance = new SCARuntime();
                 
                 // Load the runtime
-                // Get root from environment variable SCA4CPP_SYSTEM_ROOT
-                char* systemRoot = getenv("SCA4CPP_SYSTEM_ROOT");
+                // Get root from environment variable TUSCANY_SCACPP_SYSTEM_ROOT
+                char* systemRoot = getenv(TUSCANY_SCACPP_SYSTEM_ROOT);
                 if (systemRoot == 0)
                 {
-                    throw SystemConfigurationException("SCA4CPP_SYSTEM_ROOT environment variable not set");
+                	string msg = TUSCANY_SCACPP_SYSTEM_ROOT;
+                	msg += " environment variable not set";
+                    throw SystemConfigurationException(msg.c_str());
                 }
                 instance->load(systemRoot);
             }
@@ -223,10 +234,12 @@
                 // -------------------------------------------
                 // Get the default module from the environment
                 // -------------------------------------------
-                const char* defMod = getenv("SCA4CPP_DEFAULT_MODULE");
+                const char* defMod = getenv(TUSCANY_SCACPP_DEFAULT_MODULE);
                 if (!defMod)
                 {
-                    throw SystemConfigurationException("SCA4CPP_DEFAULT_MODULE environment variable not set");
+                	message = TUSCANY_SCACPP_DEFAULT_MODULE;
+                	message += " environment variable not set";
+                    throw SystemConfigurationException(message.c_str());
                 }
 
                 string subsystemName, moduleName;

Modified: incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp
URL: http://svn.apache.org/viewcvs/incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp?rev=378287&r1=378286&r2=378287&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/test/src/TestSCA.cpp Thu Feb 16 08:10:53 2006
@@ -58,7 +58,7 @@
                 custid = "fred";
                 const string& csname = myService->getCustnamecs(custid);
                 cout << "Returned string: " << csname.c_str() << " custid now: " << custid.c_str() <<endl;
-                value = myService->getMyValue("999");
+                //value = myService->getMyValue("999");
                 cout << "My value is: " << value << endl;
             }
             catch (char* x)

Modified: incubator/tuscany/cpp/sca/scatest.sh
URL: http://svn.apache.org/viewcvs/incubator/tuscany/cpp/sca/scatest.sh?rev=378287&r1=378286&r2=378287&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/scatest.sh (original)
+++ incubator/tuscany/cpp/sca/scatest.sh Thu Feb 16 08:10:53 2006
@@ -19,9 +19,9 @@
 
 export SCA4CPP_HOME="$APFULLDIR"
 if [ x$SCA4CPP = x ]; then
-export SCA4CPP="$SCA4CPP_HOME"
+export TUSCANY_SCACPP="$SCA4CPP_HOME"
 fi
-echo "Using SCA installed at $SCA4CPP"
+echo "Using SCA installed at $SCA4CPP_HOME"
 
 if [ x$AXISCPP_DEPLOY = x ]; then
 echo "AXISCPP_DEPLOY not set"
@@ -35,18 +35,17 @@
 fi
 echo "Using Xerces C++ installed at $XERCES_DEPLOY"
 
-if [ x$SDO4CPP = x ]; then
-echo "SDO4CPP not set"
-export SDO4CPP=$SCA4CPP_HOME/../sdo
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"exit;
 fi
-echo "Using SDO installed at $SDO4CPP"
+echo "Using SDO installed at $TUSCANY_SDOCPP"
 
 TEST_ROOT=$SCA4CPP_HOME/runtime/core/test
 
-export LD_LIBRARY_PATH=$SCA4CPP/lib:$SDO4CPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib
 
-export SCA4CPP_SYSTEM_ROOT=$SCA4CPP_HOME/runtime/core/test/testSCASystem
-export SCA4CPP_DEFAULT_MODULE=SubSystem1
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT/testSCASystem
+export TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1
 
-cd $SCA4CPP/bin
-test/tuscany_sca_test
+cd $TUSCANY_SCACPP/bin/test
+./tuscany_sca_test