[omniORB] Persistent IOR

Ceyhun ÖZGÜN ceyhun_ozgun@hotmail.com
Mon, 01 May 2000 00:47:06 PDT


ok, you are setting object key to an known value,
but you have to set IIOP listening port too.
You can set listening BOA port to an specific value with
'-BOAiiop_port' commanf line parameter to BOA_init function.




>From: "Alex Gilburd" <agilburd@vicinium.com>
>To: <omniorb-list@uk.research.att.com>
>Subject: [omniORB] Persistent IOR
>Date: Sat, 29 Apr 2000 12:07:20 -0400
>
>Hi,
>
>I am trying to create a persistent IOR for the client which is configured 
>once
>and
>would need to have the same IOR even if server is restarted.
>
>I understand that I have to set network location and object key to make IOR
>persistent,
>but I am not clear about correct implementation.
>
>I found one reference in omniORB archives:
>http://www.uk.research.att.com/omniORB/archives/1998-12/0008.html
>
>So far I have:
>typedef omniObjectKey objectKey;
>
>struct modKeyType
>{
>  unsigned long hi;
>  char cstrKey[8];
>};
>
>typedef union {
>  modKeyType modKey;
>  omniORB::objectKey objKey;
>} objectKeyVariant;
>
>server main:
>int main(int argc, char* argv[])
>{
>
>   objectKeyVariant key;
>   key.modKey.hi = 2;
>   strncpy(key.modKey.cstrKey, "C2kEvent", 8);
>
>    CORBA::ORB_var orb = CORBA::ORB_init(argc, argv,"omniORB2");
>   CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,"omniORB2_BOA");
>
>   CoactiveEvent_impl *ce = new CoactiveEvent_impl(key.objKey);
>   ce->_obj_is_ready(boa);
>
>   async_var asyncRef = ce->_this();
>   CORBA::String_var str = orb->object_to_string(asyncRef);
>
>   cout << str << endl;
>   FILE *iorfile = fopen("ior.out", "w");
>   fprintf(iorfile, "%s", (char *)str);
>   fclose(iorfile);
>
>   boa->impl_is_ready();
>}
>
>Could you tell me what else do I need to do, because each run of this 
>server
>produces different IOR?
>
>Client is a third party application which needs this IOR, it can be set 
>only
>once.
>
>
>Thanks,
>
>Alex

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com