From: Darrell S. <dr...@nr...> - 2004-12-09 16:24:31
|
On Tuesday, November 9 2004 at 20:29+0100, Egon Teiniker wrote: > >The CCM_Local/HomeFinder.h file is part of the cpp-environment package >which you can check out from ccmtools.sf.net: Sorry, I should have figured it out... I opted not to use confix, and this mistake is a result of that decision... OK, with this fixed, I was able to generate and run the local component with no further problems... However, now I'm having trouble getting the remote component to work. I'm still using "example1" from the tutorial. I created all of the pieces via: ccmtools-generate c++local -a -o CarRental.remote *.idl ccmtools-generate idl2 -o CarRental.remote/CORBA_Stubs *.idl ccmtools-generate c++remote -o CarRental.remote *.idl ccmtools-generate c++remote-test -o CarRental.remote *.idl cp impl/CarRental_business_impl.cc impl/CarRental_impl.h \ impl/CarRental_maintenance_impl.cc CarRental.remote/impl (the implementation files are the ones which came with example1 in the ccmtools distribution). Next, I compile all of these things into these shared libraries: libCCM_Local_BigBusiness_CCM_Session_CarRental.dylib libCCM_Remote_BigBusiness_CCM_Session_CarRental.dylib libCORBA_Converter.dylib libCORBA_Stubs.dylib libCarRental_impl.dylib All seems fine... next I copied the remote test program from example1/test, fixed it up, and then linked the test with: c++ -DUSING_CONFIX -Wno-long-double -g -I/opt/local/include \ -I$destroot/include -o try \ _check_CCM_Remote_BigBusiness_CCM_Session_CarRental_remote.cc \ -L$destroot/lib -lCCM_Remote_BigBusiness_CCM_Session_CarRental \ -lCCM_Remote_CCM_Session_Container -lCORBA_Stubs \ -L/opt/local/lib -lWX_Utils_types -lWX_Utils_error \ -lWX_Utils_code -lmicocoss2.3.11 -lmico2.3.11 This links fine... but now how do I get micod (or whatever) to load the component when needed? What does it load? One of these shared libraries? While I used a corba environment in the past, it came with scripts which would start all of the servers/daemons, and unfortunately, I relied on them! Could you give me some hints on how to get this going? Or if I've done something wrong above (or left something out)? A couple of other minor points... It would be nice if instead of using 'USING_CONFIX' to switch on/off what path should be used to include the header files, you used something like 'USING_CONFIX_PATHS'. I find that I have to define 'USING_CONFIX' even though I'm not, and I worry that at some point 'USING_CONFIX' will imply more than just different header paths. BTW, what do you use when you're not USING_CONFIX... just makefiles created by hand? Also, I had to make some changes to the Cpp templates to get the generated code to compile (I think it's just an oversight), and I've included that patch file below. many thanks, Darrell diff -ru ../../ccmtools.orig/ccmtools/src/templates/CppRemoteTemplates/MAttributeDefFacetAdapterImpl ./ccmtools/src/templates/CppRemoteTemplates/MAttributeDefFacetAdapterImpl --- ../../ccmtools.orig/ccmtools/src/templates/CppRemoteTemplates/MAttributeDefFacetAdapterImpl Tue Sep 7 13:38:26 2004 +++ ./ccmtools/src/templates/CppRemoteTemplates/MAttributeDefFacetAdapterImpl Wed Dec 8 10:39:35 2004 @@ -10,7 +10,10 @@ catch(...) { throw CORBA::SystemException(); } - return CCM::%(MAttributeDefConvertResultType)s(result); + + %(CORBAType)s return_value; + CCM_Remote::convertToCorba(result, return_value); + return return_value; } void @@ -20,7 +23,7 @@ LDEBUGNL(CCM_REMOTE, " %(Object)sFacetAdapter->%(Identifier)s(value)"); %(LanguageType)s local_value; try { - local_value = CCM::%(MAttributeDefConvertParameter)s(value); + CCM_Remote::convertFromCorba(value, local_value); local_adapter->%(Identifier)s(local_value); } catch(...) { |