summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-sql
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/samples/store-sql')
-rwxr-xr-xsca-cpp/trunk/samples/store-sql/ssl-start3
-rwxr-xr-xsca-cpp/trunk/samples/store-sql/start2
-rwxr-xr-xsca-cpp/trunk/samples/store-sql/stop1
-rw-r--r--sca-cpp/trunk/samples/store-sql/store.composite23
4 files changed, 27 insertions, 2 deletions
diff --git a/sca-cpp/trunk/samples/store-sql/ssl-start b/sca-cpp/trunk/samples/store-sql/ssl-start
index 46e46dd32c..9263e16dfb 100755
--- a/sca-cpp/trunk/samples/store-sql/ssl-start
+++ b/sca-cpp/trunk/samples/store-sql/ssl-start
@@ -21,6 +21,7 @@
../../modules/http/ssl-cert-conf tmp localhost
../../modules/http/httpd-conf tmp localhost 8090 htdocs
../../modules/http/httpd-ssl-conf tmp 8453
+../../modules/http/httpd-auth-conf tmp
../../modules/server/server-conf tmp
../../modules/server/scheme-conf tmp
cat >>tmp/conf/httpd.conf <<EOF
@@ -30,6 +31,8 @@ SCAComposite store.composite
EOF
+../../components/cache/memcached-start
+../../components/sqldb/pgsql-conf tmp
../../components/sqldb/pgsql-start tmp
../../components/sqldb/pgsql "create table store(key text, value text);" 1>/dev/null 2>&1
../../modules/http/httpd-start tmp
diff --git a/sca-cpp/trunk/samples/store-sql/start b/sca-cpp/trunk/samples/store-sql/start
index 60f5a2d702..95881294d1 100755
--- a/sca-cpp/trunk/samples/store-sql/start
+++ b/sca-cpp/trunk/samples/store-sql/start
@@ -27,6 +27,8 @@ SCAComposite store.composite
EOF
+../../components/cache/memcached-start
+../../components/sqldb/pgsql-conf tmp
../../components/sqldb/pgsql-start tmp
../../components/sqldb/pgsql "create table store(key text, value text);" 1>/dev/null 2>&1
../../modules/http/httpd-start tmp
diff --git a/sca-cpp/trunk/samples/store-sql/stop b/sca-cpp/trunk/samples/store-sql/stop
index 603165ef46..2226018a3f 100755
--- a/sca-cpp/trunk/samples/store-sql/stop
+++ b/sca-cpp/trunk/samples/store-sql/stop
@@ -19,3 +19,4 @@
../../modules/http/httpd-stop tmp
../../components/sqldb/pgsql-stop tmp
+../../components/cache/memcached-stop
diff --git a/sca-cpp/trunk/samples/store-sql/store.composite b/sca-cpp/trunk/samples/store-sql/store.composite
index 501d465b03..18a77c2802 100644
--- a/sca-cpp/trunk/samples/store-sql/store.composite
+++ b/sca-cpp/trunk/samples/store-sql/store.composite
@@ -49,7 +49,7 @@
<service name="Total">
<t:binding.jsonrpc uri="total"/>
</service>
- <reference name="cache" target="Sqldb"/>
+ <reference name="cache" target="Cache"/>
</component>
<component name="CurrencyConverter">
@@ -59,9 +59,28 @@
</service>
</component>
+ <component name="Cache">
+ <implementation.cpp path="../../components/cache" library="libfrontcache"/>
+ <service name="Cache">
+ <t:binding.atom uri="cache"/>
+ </service>
+ <reference name="l1reader" target="Memcache"/>
+ <reference name="l1writer" target="Memcache"/>
+ <reference name="l2reader" target="Sqldb"/>
+ <reference name="l2writer" target="Sqldb"/>
+ </component>
+
+ <component name="Memcache">
+ <implementation.cpp path="../../components/cache" library="libmemcache"/>
+ <service name="Memcache">
+ <t:binding.atom uri="memcache"/>
+ </service>
+ <property name="servers">localhost:11211</property>
+ </component>
+
<component name="Sqldb">
<implementation.cpp path="../../components/sqldb" library="libsqldb"/>
- <property name="conninfo">dbname=db</property>
+ <property name="conninfo">host=localhost port=5432 dbname=db</property>
<property name="table">store</property>
<service name="Sqldb">
<t:binding.atom uri="sqldb"/>