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/08 10:05:42 UTC
svn commit: r441424 - in /incubator/tuscany/cpp/sca:
runtime/core/src/tuscany/sca/util/Library.cpp
samples/BigBank/bigbank.account/AccountServiceImpl.h
Author: jsdelfino
Date: Fri Sep 8 01:05:42 2006
New Revision: 441424
URL: http://svn.apache.org/viewvc?view=rev&rev=441424
Log:
Fixed unresolved symbol in libAccount.so, and improved error reporting in Library::load()
Modified:
incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp
incubator/tuscany/cpp/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h
Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp?view=diff&rev=441424&r1=441423&r2=441424
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp Fri Sep 8 01:05:42 2006
@@ -76,23 +76,29 @@
string msg;
#if defined(WIN32) || defined (_WINDOWS)
int l = name.length();
+ string dllName;
if (l>=4 && name.substr(l-4, 4)==".dll")
{
- hDLL = LoadLibrary(name.c_str());
+ dllName = name;
}
else
{
- hDLL = LoadLibrary((name+".dll").c_str());
+ dllName = name+".dll";
+ }
+ hDLL = LoadLibrary(dllName.c_str());
+ if (hDLL == NULL)
+ {
+ msg = "Unable to load library: " + dllName;
}
#else
int l = name.length();
+ string soName;
if (l>=3 && name.substr(l-3, 3)==".so")
{
- hDLL = dlopen(name.c_str(), RTLD_NOW);
+ soName = name;
}
else
{
- string soName;
int s = name.rfind("/");
if (s == name.length())
{
@@ -103,13 +109,16 @@
s++;
soName = name.substr(0, s) + "lib" + name.substr(s, name.length()-s) + ".so";
}
- hDLL = dlopen(soName.c_str(), RTLD_NOW);
+ }
+ hDLL = dlopen(soName.c_str(), RTLD_NOW);
+ if (hDLL == NULL)
+ {
+ msg = "Unable to load library: " + soName + ": " + dlerror();
}
#endif
if (hDLL == NULL)
{
LOGERROR_1(1, "Library::load: Unable to load library %s", name.c_str());
- msg = "Unable to load library: " + name;
throw TuscanyRuntimeException(msg.c_str());
}
}
Modified: incubator/tuscany/cpp/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h?view=diff&rev=441424&r1=441423&r2=441424
==============================================================================
--- incubator/tuscany/cpp/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h (original)
+++ incubator/tuscany/cpp/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h Fri Sep 8 01:05:42 2006
@@ -30,11 +30,6 @@
{
public:
- AccountServiceImpl();
- virtual ~AccountServiceImpl();
-
- // public business methods
-
virtual DataObjectPtr /*AccountReport*/
getAccountReport(const char* customerID);
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org