tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r1308245 - in /tuscany/sca-cpp/trunk: components/cache/ hosting/server/ macos/ patches/ samples/store-cluster/shared/ samples/store-cpp/ samples/store-java/ samples/store-python/ samples/store-scheme/ samples/store-sql/ samples/store-vhost/...
Date Mon, 02 Apr 2012 06:23:45 GMT
Author: jsdelfino
Date: Mon Apr  2 06:23:44 2012
New Revision: 1308245

URL: http://svn.apache.org/viewvc?rev=1308245&view=rev
Log:
Automatically reconnect to a Memcached server after a disconnection.

Added:
    tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch
Modified:
    tuscany/sca-cpp/trunk/components/cache/cache.composite
    tuscany/sca-cpp/trunk/components/cache/memcache.componentType
    tuscany/sca-cpp/trunk/components/cache/memcache.cpp
    tuscany/sca-cpp/trunk/hosting/server/server.composite
    tuscany/sca-cpp/trunk/hosting/server/start
    tuscany/sca-cpp/trunk/macos/macos-install
    tuscany/sca-cpp/trunk/samples/store-cluster/shared/shared.composite
    tuscany/sca-cpp/trunk/samples/store-cpp/store.composite
    tuscany/sca-cpp/trunk/samples/store-java/store.composite
    tuscany/sca-cpp/trunk/samples/store-python/store.composite
    tuscany/sca-cpp/trunk/samples/store-scheme/store.composite
    tuscany/sca-cpp/trunk/samples/store-sql/store.composite
    tuscany/sca-cpp/trunk/samples/store-vhost/shared/shared.composite
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-install
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all

Modified: tuscany/sca-cpp/trunk/components/cache/cache.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/cache/cache.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/cache/cache.composite (original)
+++ tuscany/sca-cpp/trunk/components/cache/cache.composite Mon Apr  2 06:23:44 2012
@@ -26,7 +26,9 @@
         <service name="memcache">
             <binding.http uri="memcache"/>
         </service>
-        <property name="servers">localhost localhost:11212 localhost:11213</property>
+        <property name="server">localhost</property>
+        <property name="server">localhost:11212</property>
+        <property name="server">localhost:11213</property>
     </component>
 
     <component name="l2cache">

Modified: tuscany/sca-cpp/trunk/components/cache/memcache.componentType
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/cache/memcache.componentType?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/cache/memcache.componentType (original)
+++ tuscany/sca-cpp/trunk/components/cache/memcache.componentType Mon Apr  2 06:23:44 2012
@@ -23,6 +23,6 @@
   targetNamespace="http://tuscany.apache.org/xmlns/sca/components">
         
     <service name="memcache"/>
-    <property name="servers" type="xsd:string">localhost</property>
+    <property name="server" type="xsd:string">localhost</property>
 
 </composite>

Modified: tuscany/sca-cpp/trunk/components/cache/memcache.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/cache/memcache.cpp?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/cache/memcache.cpp (original)
+++ tuscany/sca-cpp/trunk/components/cache/memcache.cpp Mon Apr  2 06:23:44 2012
@@ -98,12 +98,21 @@ private:
 };
 
 /**
+ * Convert a list of properties to a list of server addresses.
+ */
+const list<string> servers(const list<value>& params) {
+    if (isNil(params))
+        return list<string>();
+    const value s = ((lambda<value(list<value>)>)car(params))(list<value>());
+    return cons<string>(s, servers(cdr(params)));
+}
+
+/**
  * Start the component.
  */
-const failable<value> start(unused const list<value>& params) {
+const failable<value> start(const list<value>& params) {
     // Connect to memcached
-    const value servers = ((lambda<value(list<value>)>)car(params))(list<value>());
-    memcache::MemCached& ch = *(new (gc_new<memcache::MemCached>()) memcache::MemCached(tokenize("
", servers)));
+    memcache::MemCached& ch = *(new (gc_new<memcache::MemCached>()) memcache::MemCached(servers(params)));
 
     // Return the component implementation lambda function
     return value(lambda<value(const list<value>&)>(applyCache(ch)));

Modified: tuscany/sca-cpp/trunk/hosting/server/server.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/server.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/server.composite (original)
+++ tuscany/sca-cpp/trunk/hosting/server/server.composite Mon Apr  2 06:23:44 2012
@@ -144,7 +144,8 @@
         <service name="Memcache">
             <binding.http uri="memcache"/>
         </service>
-        <property name="servers">localhost:11211</property>
+        <property name="server">localhost:11211</property>
+        <property name="server">localhost:11212</property>
     </component>
 
     <component name="Database">

Modified: tuscany/sca-cpp/trunk/hosting/server/start
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/start?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/start (original)
+++ tuscany/sca-cpp/trunk/hosting/server/start Mon Apr  2 06:23:44 2012
@@ -56,7 +56,6 @@ EOF
 else
     cat >tmp/conf/log.conf <<EOF
 # Generated by: start $*
-LogLevel debug
 ErrorLog $here/tmp/logs/error_log
 CustomLog $here/tmp/logs/access_log combined
 
@@ -115,5 +114,6 @@ AliasMatch /v/([^/]+)(.*)$ $here/htdocs/
 EOF
 
 # Start server
+#../../modules/http/httpd-loglevel-conf tmp debug
 ../../modules/http/httpd-start tmp
 

Modified: tuscany/sca-cpp/trunk/macos/macos-install
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/macos/macos-install?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/macos/macos-install (original)
+++ tuscany/sca-cpp/trunk/macos/macos-install Mon Apr  2 06:23:44 2012
@@ -65,6 +65,8 @@ cd $build
 # Build Apache APR and HTTP server
 svn co -r 1201086 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x
 cd apr-1.4.x
+curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch
+patch -p0 <apr-1.4.x.patch
 ./buildconf
 ./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin
 make

Added: tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch?rev=1308245&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch (added)
+++ tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch Mon Apr  2 06:23:44 2012
@@ -0,0 +1,12 @@
+--- memcache/apr_memcache.c
++++ memcache/apr_memcache.c
+@@ -301,9 +301,6 @@
+     }
+ 
+     rv = apr_socket_connect(conn->sock, sa);
+-    if (rv != APR_SUCCESS) {
+-        return rv;
+-    }
+ 
+     rv = apr_socket_timeout_set(conn->sock, -1);
+     if (rv != APR_SUCCESS) {

Modified: tuscany/sca-cpp/trunk/samples/store-cluster/shared/shared.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cluster/shared/shared.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cluster/shared/shared.composite (original)
+++ tuscany/sca-cpp/trunk/samples/store-cluster/shared/shared.composite Mon Apr  2 06:23:44
2012
@@ -37,7 +37,9 @@
         <service name="Memcache">
             <binding.atom uri="memcache"/>
         </service>
-        <property name="servers">localhost:11211 localhost:11212 localhost:11213</property>
+        <property name="server">localhost:11211</property>
+        <property name="server">localhost:11212</property>
+        <property name="server">localhost:11213</property>
     </component>
 
     <component name="Masterdb">

Modified: tuscany/sca-cpp/trunk/samples/store-cpp/store.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cpp/store.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cpp/store.composite (original)
+++ tuscany/sca-cpp/trunk/samples/store-cpp/store.composite Mon Apr  2 06:23:44 2012
@@ -63,7 +63,7 @@
         <service name="Cache">
             <binding.atom uri="cache"/>
         </service>
-        <property name="servers">localhost:11211</property>
+        <property name="server">localhost:11211</property>
     </component>     
 
 </composite>

Modified: tuscany/sca-cpp/trunk/samples/store-java/store.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-java/store.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-java/store.composite (original)
+++ tuscany/sca-cpp/trunk/samples/store-java/store.composite Mon Apr  2 06:23:44 2012
@@ -63,7 +63,7 @@
         <service name="Cache">
             <binding.atom uri="cache"/>
         </service>
-        <property name="servers">localhost:11211</property>
+        <property name="server">localhost:11211</property>
     </component>     
 
 </composite>

Modified: tuscany/sca-cpp/trunk/samples/store-python/store.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-python/store.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-python/store.composite (original)
+++ tuscany/sca-cpp/trunk/samples/store-python/store.composite Mon Apr  2 06:23:44 2012
@@ -63,7 +63,7 @@
         <service name="Cache">
             <binding.atom uri="cache"/>
         </service>
-        <property name="servers">localhost:11211</property>
+        <property name="server">localhost:11211</property>
     </component>     
 
 </composite>

Modified: tuscany/sca-cpp/trunk/samples/store-scheme/store.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-scheme/store.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-scheme/store.composite (original)
+++ tuscany/sca-cpp/trunk/samples/store-scheme/store.composite Mon Apr  2 06:23:44 2012
@@ -63,7 +63,7 @@
         <service name="Cache">
             <binding.atom uri="cache"/>
         </service>
-        <property name="servers">localhost:11211</property>
+        <property name="server">localhost:11211</property>
     </component>     
 
 </composite>

Modified: tuscany/sca-cpp/trunk/samples/store-sql/store.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-sql/store.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-sql/store.composite (original)
+++ tuscany/sca-cpp/trunk/samples/store-sql/store.composite Mon Apr  2 06:23:44 2012
@@ -74,7 +74,7 @@
         <service name="Memcache">
             <binding.atom uri="memcache"/>
         </service>
-        <property name="servers">localhost:11211</property>
+        <property name="server">localhost:11211</property>
     </component>     
 
     <component name="Sqldb">

Modified: tuscany/sca-cpp/trunk/samples/store-vhost/shared/shared.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-vhost/shared/shared.composite?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-vhost/shared/shared.composite (original)
+++ tuscany/sca-cpp/trunk/samples/store-vhost/shared/shared.composite Mon Apr  2 06:23:44
2012
@@ -26,7 +26,7 @@
         <service name="Cache">
             <binding.atom uri="cache"/>
         </service>
-        <property name="servers">localhost:11211</property>
+        <property name="server">localhost:11211</property>
     </component>     
 
 </composite>

Modified: tuscany/sca-cpp/trunk/ubuntu/ubuntu-install
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/ubuntu/ubuntu-install (original)
+++ tuscany/sca-cpp/trunk/ubuntu/ubuntu-install Mon Apr  2 06:23:44 2012
@@ -50,6 +50,8 @@ if [ "$?" != "0" ]; then
 fi
 svn co -r 1201086 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x
 cd apr-1.4.x
+curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch
+patch -p0 <apr-1.4.x.patch
 ./buildconf
 ./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin
 make

Modified: tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all?rev=1308245&r1=1308244&r2=1308245&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all (original)
+++ tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all Mon Apr  2 06:23:44 2012
@@ -50,6 +50,8 @@ if [ "$?" != "0" ]; then
 fi
 svn co -r 1201086 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x
 cd apr-1.4.x
+curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch
+patch -p0 <apr-1.4.x.patch
 ./buildconf
 ./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin
 make



Mime
View raw message