[omniORB] using persistent reference with corbaloc

Frederico Faria fred_faria at yahoo.com.br
Mon Mar 21 14:27:36 GMT 2005


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,
> > 
> > This option doesn´t work for me ( see below ). I
> also
> > tried to use "-endPoint=giop:tcp::40001" but it
> also
> > didn´t work.  Below is the server code.
> > Thank you,
> > 
> > Frederico Faria
> > 
> > ./server -ORBendPoint=giop:tcp::40001
> -ORBtraceLevel
> > 40
> > omniORB: Configuration file "/etc/omniORB.cfg"
> either
> > does not exist or is not a file. No settings read.
> > omniORB: ORB_init failed: unknown option
> > (-ORBendPoint=giop:tcp::40001) in -ORB arguments
> > Caught CORBA::SystemException.
> > omniORB: Final clean-up
> > omniORB: Released 254 static TypeCodes.
> > omniORB: Deleted 0 nil object references and 2
> other
> > tracked objects.
> > omniORB: Final clean-up completed.
> >
>
-----------------------------------------------------
> > 
> > My server code is:
> > 
> >  CORBA::Object_var obj =
> > orb->resolve_initial_references("RootPOA");
> >     PortableServer::POA_var root_poa =
> > PortableServer::POA::_narrow(obj);
> >     PortableServer::POAManager_var pman =
> > root_poa->the_POAManager();
> >     pman->activate();
> > 
> >     // Create a new POA with the persistent
> lifespan
> > policy.
> >     CORBA::PolicyList pl;
> >     pl.length(2);
> >     pl[0] =
> >
>
root_poa->create_lifespan_policy(PortableServer::PERSISTENT);
> >     pl[1] =
> >
>
root_poa->create_id_assignment_policy(PortableServer::USER_ID);
> > 
> >     PortableServer::POA_var poa =
> > root_poa->create_POA("my poa", pman, pl);
> > 
> >     // Always use the same object id.
> >     PortableServer::ObjectId_var oid =
> >      
> > PortableServer::string_to_ObjectId("AuthFactory");
> > 
> >     // Activate the echo object...
> >     TINC_AuthFactory_i* myauth = new
> > TINC_AuthFactory_i();
> >     poa->activate_object_with_id(oid, myauth);
> > 
> >     obj = myauth->_this();
> >     CORBA::String_var
> > sior(orb->object_to_string(obj));
> >     cerr << "'" << (char*)sior << "'" << endl;
> > 
> >     myauth->_remove_ref();
> > 
> >     orb->run();
> > 
> > 
> > 
> > 
> > 
> > --- Wernke zur Borg <wzb at anitesystems.de> wrote:
> > > 
> > > Try calling
> > > 
> > > 	./server -ORBendPoint=giop:tcp::40001
> > > 
> > > instead of
> > > 
> > > 	./server -endPoint=giop:tcp:wood:40001
> > > 
> > > 
> > > Furthermore, are you using the special
> omniINSPOA,
> > > and are you activating
> > > your object(s) with activate_object_with_id() ?
> > > 
> > > Wernke 
> > > 
> > > > -----Original Message-----
> > > > From: omniorb-list-bounces at omniorb-support.com
> 
> > > >
> [mailto:omniorb-list-bounces at omniorb-support.com]
> > > On Behalf 
> > > > Of Frederico Faria
> > > > Sent: 21 March 2005 14:46
> > > > To: omniorb-list at omniorb-support.com
> > > > Subject: [omniORB] using persistent reference
> with
> > > corbaloc
> > > > 
> > > > Hi all,
> > > > 
> > > >  I am using the omni example ( available in
> > > product
> > > > distribution ) for persistent object
> reference.
> > > > 
> > > > But in my client code when I use the IOR
> dumped
> > > from
> > > > server everything works fine. 
> > > > But  when I try to use the corbaloc syntax the
> > > things
> > > > dont´work. I would like to use the corbaloc
> syntax
> > > > on client instead the IOR.
> > > > 
> > > >  My client piece of code with corbaloc:
> > > >    
> > > >    CORBA::String_var strIOR =
> > > > ("corbaloc:iiop:wood:40001/AuthFactory");
> > > >    CORBA::Object_ptr obj =
> > > > ob->string_to_object(strIOR);
> > > > 
> > > >  
> > > >    The server code ( copied from omni example
> > > > directory ) uses the "AuthFactory" as object
> id.
> > > > I start the server like: 
> > > >  ./server -endPoint=giop:tcp:wood:40001
> > > > 
> > > > Both server and client are running at same
> host.  
> > > > When I run the client I receive a CORBA
> exception.
> > > > Below are the server and client trace. 
> > > > Could Somebody give any help to resolve the
> > > problem.
> > > > 
> > > > Thank you,
> > > > Frederico Faria
> > > > 
> > > > 
> > > > -------------------------------------------
> > > >  Server Trace
> > > > omniORB: Initialising incoming endpoints.
> > > > omniORB: Bind to address 0.0.0.0.
> > > > omniORB: Starting serving incoming endpoints.
> > > > omniORB: AsyncInvoker: thread id = 1 has
> started.
> > > > Total threads = 1
> > > > omniORB: giopRendezvouser task execute for
> > > > giop:tcp:10.131.10.150:38191
> > > > omniORB: Adding root/my poa<AuthFactory>
> > > (activating)
> > > > to object table.
> > > > omniORB: State root/my poa<AuthFactory>
> > > (activating)
> > > > -> active
> > > > omniORB: Creating ref to local: root/my
> > > > poa<AuthFactory>
> > > >  target id      : IDL:TINC/AuthFactory:1.0
> > > >  most derived id: IDL:TINC/AuthFactory:1.0
> > > > 
> > > > 
> > > >
> 
=== 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