[sword-cvs] sword/bindings/corba/orbitcpp swordorb-impl.cpp,1.6,1.7 swordorb-impl.hpp,1.5,1.6 testclient.cpp,1.5,1.6

sword@www.crosswire.org sword@www.crosswire.org
Mon, 18 Aug 2003 10:32:55 -0700


Update of /usr/local/cvsroot/sword/bindings/corba/orbitcpp
In directory www:/tmp/cvs-serv12750/bindings/corba/orbitcpp

Modified Files:
	swordorb-impl.cpp swordorb-impl.hpp testclient.cpp 
Log Message:
Added testConnection to ORB and use this in the java client to assure
if ORB service dies for a session, that it is restarted seamlessly.


Index: swordorb-impl.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/bindings/corba/orbitcpp/swordorb-impl.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- swordorb-impl.cpp	11 May 2003 22:56:05 -0000	1.6
+++ swordorb-impl.cpp	18 Aug 2003 17:32:53 -0000	1.7
@@ -56,12 +56,20 @@
 	StringList *SWMgr_impl::getGlobalOptions() throw(CORBA::SystemException) {
 	}
 
+
 	StringList *SWMgr_impl::getGlobalOptionValues(const char *option) throw(CORBA::SystemException) {
 	}
 
+
 	void SWMgr_impl::terminate() throw(CORBA::SystemException) {
 		exit(0);
 	}
+
+
+	CORBA::Boolean SWMgr_impl::testConnection() throw(CORBA::SystemException) {
+		return true;
+	}
+
 
 	StringList *SWModule_impl::search(const char *istr, SearchType searchType, CORBA::Long flags, const char *scope) throw(CORBA::SystemException) {
 		int stype = 2;

Index: swordorb-impl.hpp
===================================================================
RCS file: /usr/local/cvsroot/sword/bindings/corba/orbitcpp/swordorb-impl.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- swordorb-impl.hpp	11 May 2003 22:56:05 -0000	1.5
+++ swordorb-impl.hpp	18 Aug 2003 17:32:53 -0000	1.6
@@ -56,6 +56,7 @@
 	StringList *getGlobalOptionValues(const char *option) throw(CORBA::SystemException);
 	void     setCipherKey(const char *modName, const char *key) throw(CORBA::SystemException) { delegate->setCipherKey(modName, key); }
 	void     terminate() throw(CORBA::SystemException);
+	CORBA::Boolean     testConnection() throw(CORBA::SystemException);
 
 };
 }; // namespace hellomodule

Index: testclient.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/bindings/corba/orbitcpp/testclient.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- testclient.cpp	6 May 2003 03:27:56 -0000	1.5
+++ testclient.cpp	18 Aug 2003 17:32:53 -0000	1.6
@@ -27,6 +27,7 @@
 		swordorb::SWModule_ptr module;
 		swordorb::ModInfoList *modInfoList;
 
+		std::cout << "Connected: "  << mgr->testConnection() << "\n";
 		std::cout << "PrefixPath: " << mgr->getPrefixPath() << "\n";
 		std::cout << "ConfigPath: " << mgr->getConfigPath() << "\n";
 		modInfoList = mgr->getModInfoList();