[omniORB] using persistent reference with corbaloc

Welch, Jay jay.welch at transcore.com
Mon Mar 21 10:57:54 GMT 2005


Remove the = sign from your -ORBendPoint argument. The output from the run is complaining about that. 

-----Original Message-----
From: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com]On Behalf Of Frederico
Faria
Sent: Monday, March 21, 2005 10:25 AM
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
> > 
> > 
> >
> ----------------------------------------------------
> > Client Trace
> > 
> > omniORB: Creating ref to remote: key<AuthFactory>
> >  target id      : IDL:omg.org/CORBA/Object:1.0
> >  most derived id:
> > omniORB: AsyncInvoker: thread id = 1 has started.
> > Total threads = 1
> > omniORB: Scavenger task execute.
> > omniORB: Client attempt to connect to
> > giop:tcp:wood:40001
> > omniORB: throw giopStream::CommFailure from
> > giopStream.cc:1073(0,NO,TRANSIENT_ConnectFailed)
> > omniORB: throw TRANSIENT from omniObjRef.cc:759
> > (NO,TRANSIENT_ConnectFailed)
> > Caught a CORBA::SystemException.
> > 
> > 
> >     
> > 
> > 
> > 	
> > 	
> > 		
> > Yahoo! Mail - Com 250MB de espaço. Abra sua conta!
> 
> > http://mail.yahoo.com.br/
> > 
> > _______________________________________________
> > omniORB-list mailing list
> > omniORB-list at omniorb-support.com
> >
>
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> > 
> > 
> 
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
>
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> 


	
	
		
Yahoo! Mail - Com 250MB de espaço. Abra sua conta! http://mail.yahoo.com.br/

_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list



More information about the omniORB-list mailing list