[omniORB] using persistent reference with corbaloc
Frederico Faria
fred_faria at yahoo.com.br
Tue Mar 22 15:51:39 GMT 2005
Hi Borg,
That works fine when I have only the omniINSPOA
in the server implementation.
When I have several POA in the server should I put
the POA name into URI ? can You give an example of URI
syntax when there is several POA in the server ?
Or should be necessary use any command line argument
on the client ?
I apologize if that information has been already
at omniORB documentation but I didnt find it.
Thank you one more time,
Frederico Faria
--- Wernke zur Borg <wzb at anitesystems.de> escreveu:
> Hi Frederico,
>
> unfortunately you do not write how you try to
> resolve your URI. You can use
> the URI just like an ordinary stringified IOR and
> call string_to_object() on
> it.
>
> For your very first test I suggest to use the
> predefined 'omniINSPOA' on the
> server side instead of a self-made one. You can even
> use it as your root
> POA, so the code becomes quite simple.
>
> Here is the echo example from the manual in a
> corbaloc variant. The only
> different lines on the server side are the following
> (error handling
> excluded):
>
> // Get a reference to the omniINSPOA
> CORBA::Object_var obj =
> orb->resolve_initial_references("omniINSPOA");
> ...
> PortableServer::POA_var insPoa =
> PortableServer::POA::_narrow(obj);
> ...
>
> // Create unique object key for IOR and activate
> with id
> PortableServer::ObjectId_var echoOid =
> PortableServer::string_to_ObjectId(
> "TheEcho" ); // Example name
> insPoa->activate_object_with_id( echoOid, myecho
> );
> ...
>
> Start the server with option "-ORBendPoint
> giop:tcp::40001".
>
>
> On the client side you have:
>
> // Convert stringified IOR to Object Reference
> const char* sior = argv[1];
> CORBA::Object_var obj = orb->string_to_object(
> sior );
> Echo_var echoref = Echo::_narrow( obj );
> ...
>
> Start the client with argument
> "corbaloc::localhost:40001/TheEcho"
>
>
> Once this works you can try to make it more
> cumbersome... ;-)
>
> Wernke
>
> > -----Original Message-----
> > From: Frederico Faria
> [mailto:fred_faria at yahoo.com.br]
> > Sent: 21 March 2005 18:28
> > To: Wernke zur Borg;
> omniorb-list at omniorb-support.com
> > Cc: jay.welch at transcore.com
> > Subject: RE: [omniORB] using persistent reference
> with corbaloc
> >
> > Hi Borg and Welch,
> >
> > Thank you for your help. I really was using the
> wrong
> > option. Probably that was the reason because my
> > server IOR was being generated differently at each
> new
> > run.
> >
> > I have one more issue: it seems that now the end
> > point is being found by client, but my corbaloc
> URI
> > is not being resolved yet. Is my URI imcomplete ?
> do I
> > need have poa name, module name, version in the
> > corbaloc URI ? Below I attached the trace.
> >
> > "corbaloc:iiop:wood:40001/AuthFactory"
> >
> >
> > Thank you one more time,
> >
> > Frederico Faria
> >
> >
> >
> > Client Trace
> >
> ---------------------------------------------------
> >
> > 749 4f50 0100 0000 0000 0049 0000 0000
> > GIOP.......I....
> > 0000 0002 0100 0000 0000 000b 4175 7468
> > ............Auth
> > 4661 6374 6f72 7900 0000 0006 5f69 735f
> > Factory....._is_
> > 6100 6f6e 0000 0000 0000 0019 4944 4c3a
> > a.on........IDL:
> > 5449 4e43 2f41 7574 6846 6163 746f 7279
> > TINC/AuthFactory
> > 3a31 2e30 00 :1.0.
> > omniORB: inputMessage: from
> > giop:tcp:10.131.10.150:40001 76 bytes
> > omniORB:
> > 4749 4f50 0100 0001 0000 0040 0000 0000
> > GIOP....... at ....
> > 0000 0002 0000 0002 0000 0027 4944 4c3a
> > ...........'IDL:
> > 6f6d 672e 6f72 672f 434f 5242 412f 4f42
> > omg.org/CORBA/OB
> > 4a45 4354 5f4e 4f54 5f45 5849 5354 3a31
> > JECT_NOT_EXIST:1
> > 2e30 0014 4f4d 0001 0000 0001
> .0..OM......
> > omniORB: throw OBJECT_NOT_EXIST from GIOP_C.cc:244
> > (NO,OBJECT_NOT_EXIST_NoMatch)
> > omniORB: throw OBJECT_NOT_EXIST from
> omniObjRef.cc:780
> > (NO,OBJECT_NOT_EXIST_NoMatch)
> > Caught a CORBA::SystemException.
> >
> >
> >
> >
> >
> >
>
-----------------------------------------------------
> > Server Trace:
> >
> > niORB: AsyncInvoker: thread id = 3 has started.
> Total
> > threads = 3
> > omniORB: giopWorker task execute.
> > omniORB: Accepted connection from
> > giop:tcp:10.131.10.150:38361 because of this rule:
> "*
> > unix,ssl,tcp"
> > omniORB: inputMessage: from
> > giop:tcp:10.131.10.150:38361 85 bytes
> > omniORB:
> > 4749 4f50 0100 0000 0000 0049 0000 0000
> > GIOP.......I....
> > 0000 0002 0100 0000 0000 000b 4175 7468
> > ............Auth
> > 4661 6374 6f72 7900 0000 0006 5f69 735f
> > Factory....._is_
> > 6100 6f6e 0000 0000 0000 0019 4944 4c3a
> > a.on........IDL:
> > 5449 4e43 2f41 7574 6846 6163 746f 7279
> > TINC/AuthFactory
> > 3a31 2e30 00 :1.0.
> > omniORB: throw OBJECT_NOT_EXIST from GIOP_S.cc:331
> > (NO,OBJECT_NOT_EXIST_NoMatch)
> > omniORB: sendChunk: to
> giop:tcp:10.131.10.150:38361 76
> > bytes
> > omniORB:
> >
> >
> > --- Wernke zur Borg <wzb at anitesystems.de>
> escreveu:
> > >
> > > Sorry I mistyped the argument.
> > >
> > > Refer to Chapter 4 in the manual.
> > >
> > > Your command line should read:
> > >
> > > ./server -ORBendPoint giop:tcp::40001
> > >
> > > Alternatively you can set an environment
> variable:
> > >
> > > export ORBendPoint=giop:tcp::40001
> > >
> > >
> > > I mixed the two up, it's a bit confusing.
> > >
> > > Wernke
> > >
> > > > -----Original Message-----
> > > > From: Frederico Faria
> > > [mailto:fred_faria at yahoo.com.br]
> > > > Sent: 21 March 2005 16:25
> > > > To: Wernke zur Borg;
> > > omniorb-list at omniorb-support.com
> > > > Subject: RE: [omniORB] using persistent
> reference
> > > with corbaloc
> > > >
> > > > Hi Borg,
> > > >
>
=== message truncated ===
Yahoo! Mail - Com 250MB de espaço. Abra sua conta! http://mail.yahoo.com.br/
More information about the omniORB-list
mailing list