Hi,

the problem is probably caused by incompatibilities in MICO's and JacORB's IMR implementation. Yes, IMR is not CORBA specified, so it is just vendor's extension to their ORB implementation. What you need is to port client side of JacORB's IMR to MICO, which is easy task to do and then use it. Probably you'll also need to do some command-line handling changes, but this is the second steps and perhaps it'll not be required for transient servers.

Cheers,
Karel
--
Karel Gardas                  [EMAIL PROTECTED]
ObjectSecurity Ltd.           http://www.objectsecurity.com
---
Need experienced, fast, reliable technical MICO support?
---> http://www.objectsecurity.com/mico_commsup_referral.html <---
---

On Mon, 4 Dec 2006, CHAZALMARTIN Severin (P) wrote:

Hi all,





First, I am quite new to CORBA world. I work under Linux RedHat-3.0,
with MICO-2.3.11 and JacORB-2.3.3.



I was asked to make some MICO-compiled servers (that already work fine
under MICO ORB) to work under JacORB, for advanced testing. Now, my
servers register correctly to JacORB's NamingService, but I cannot use
correctly JacORB's ImR!



So as to investigate more easily, I have tried to debug this problem on
localhost, using simpliest MICO clients. I ask them to resolve the
running (JacORB) NS and ImR. Following is the extract of my MICO client
code:



************************************************************************
*********************

     // Retrieve ORB

     CORBA::ORB_var orb= CORBA::ORB_init(argc, argv);



     // For more debugging, list active objects

     cout << "CPP: Listing all active CORBA objects:" << endl;

     CORBA::ORB::ObjectIdList_ptr objList=
orb->list_initial_services();

     if (objList)

           for(unsigned int i=0; i<objList->length(); i++)

             {

               CORBA::ORB::ObjectId id= (*objList)[i];

               cout << "CORBA Obj" << i+1 << ": " << id << endl;

             }

     cout << endl;



     // Retrieve NS's IOR

     CORBA::Object_var ns_obj=
orb->resolve_initial_references("NameService");

     CosNaming::NamingContext_var nc=
CosNaming::NamingContext::_narrow(ns_obj);

     cout << "IOR for resolved NS= ";

     cout << orb->object_to_string(nc) << endl << endl;



     // Retrieve ImR's IOR

     CORBA::Object_var imr_obj=
orb->resolve_initial_references("ImplementationRepository");

     CORBA::ImplRepository_var imr=
CORBA::ImplRepository::_narrow(imr_obj);

     cout << "IOR for resolved ImR= ";

     cout << orb->object_to_string(imr) << endl;

************************************************************************
*********************



And the client was launched with:

/tmp/exe/Client -ORBInitRef
NameService=iioploc://localhost:$NS_PORT/NameService -ORBInitRef
ImplementationRepository=iioploc://localhost:$IMR_ENDPOINT/the_ImR/ImRPO
A/ImR



(For those who are familiar to JacORB's ImR, I am using an endpoint
which should requests to point at a defined port).



Now, the result of the execution of my client is coherent with my
initial server problem: I can retrieve NS IOR, but narrowing the ImR
fails!

Do you have any suggestion to explain this? I am using a wrong type as
return value for _narrow(imr_obj?)





Thanks a lot for your help!

Severin

_______________________________________________
Mico-devel mailing list
[email protected]
http://www.mico.org/mailman/listinfo/mico-devel

Reply via email to