You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/09/09 01:38:32 UTC
svn commit: r441691 - in
/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp:
ComponentContextImpl.cpp ComponentContextImpl.h CompositeContextImpl.cpp
CompositeContextImpl.h
Author: jsdelfino
Date: Fri Sep 8 16:38:31 2006
New Revision: 441691
URL: http://svn.apache.org/viewvc?view=rev&rev=441691
Log:
Fixed random crashes in BigBank when running as a Web service, we should not delete proxies returned by a Context when the Context is deleted, the lifecycle of a proxy is longer than the lifecycle of a context since the proxy can be passed to another component for example
Modified:
incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp
incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h
incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp
incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h
Modified: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp?view=diff&rev=441691&r1=441690&r2=441691
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp Fri Sep 8 16:38:31 2006
@@ -47,13 +47,6 @@
// ==========
ComponentContextImpl::~ComponentContextImpl()
{
- // --------------------------------------------
- // Delete the proxies served up by this context
- // --------------------------------------------
- for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++)
- {
- delete *iter;
- }
}
@@ -83,7 +76,6 @@
message = message + referenceName + " not wired";
throw ServiceNotFoundException(message.c_str());
}
- proxies.push_back(serviceProxy);
CPPServiceProxy::PROXIES proxies = serviceProxy->getProxies();
ServiceList services(proxies.size());
@@ -144,7 +136,6 @@
}
void* service = serviceProxy->getProxy();
- proxies.push_back(serviceProxy);
return service;
} // End getService()
Modified: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h?view=diff&rev=441691&r1=441690&r2=441691
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h Fri Sep 8 16:38:31 2006
@@ -113,12 +113,6 @@
*/
ServiceWrapper* getServiceWrapper(Service* target);
- /**
- * A vector of the proxies created by this ComponentContext. The
- * proxies will be destroyed when the ComponentContext is destroyed.
- */
- typedef vector<CPPServiceProxy*> PROXIES;
- PROXIES proxies;
};
} // End namespaca cpp
Modified: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp?view=diff&rev=441691&r1=441690&r2=441691
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp Fri Sep 8 16:38:31 2006
@@ -54,13 +54,6 @@
// ==========
CompositeContextImpl::~CompositeContextImpl()
{
- // --------------------------------------------
- // Delete the proxies served up by this context
- // --------------------------------------------
- for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++)
- {
- delete *iter;
- }
}
// ===========================================================================
@@ -89,7 +82,6 @@
// The locate service API is used from CPP clients so we are using
// our default service proxy here
CPPServiceProxy* serviceProxy = new CPPServiceProxy(service);
- proxies.push_back(serviceProxy);
LOGEXIT(1, "CompositeContextImpl::locateService");
return serviceProxy->getProxy();
Modified: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h?view=diff&rev=441691&r1=441690&r2=441691
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h Fri Sep 8 16:38:31 2006
@@ -82,12 +82,6 @@
*/
Component* component;
- /**
- * Vector of proxies created from calls to the locateService
- * method.
- */
- typedef vector<CPPServiceProxy*> PROXIES;
- PROXIES proxies;
};
} // End namespace cpp
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org