Discussion:
[omniORB] omniORB server application shutdown
evgeni.rojkov at durr.com ()
2007-06-12 14:25:12 UTC
Permalink
Dear Sir,
just a question to be sure I am doing the right things.
****
-> I develop server application supplying some interfaces using following:
orb1 = CORBA::ORB_init();
orb1->resolve_initial_references("RootPOA")
poa->activate_object(...);
poa->the_POAManager()->activate();
orb1->run();
****
-> This server acts as client calling some remote interfaces as well using
following:
orb2 = CORBA::ORB_init();
rootContext = orb2->resolve_initial_references("NameService");
obj = rootContext->resolve_str(...);
obj->doSomemting(...);
orb2->destroy();
****
-> To shutdown the appliction I call orb1->shutdown(true) (unblocking
orb1->run())
-> orb1->destroy() looks to be a part of shutdown()
-> Calls running by orb2 are canceled as well (exception handling is done)
-> Appication goes down (as desired :-)
****
-> Questions :
Is it the right way to shutdown an application having several activ ORBs doing
orb->shutdown() on one of them ?
Are some side effects possible ?

Kind Regards
Evgeni Rojkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070612/2756533e/attachment.htm
Wernke zur Borg
2007-06-12 14:41:14 UTC
Permalink
Hello,

You should not call ORB_init() more than once. Use the same ORB for both
server and client roles.

Regards, Wernke


________________________________

From: omniorb-list-***@omniorb-support.com
[mailto:omniorb-list-***@omniorb-support.com]
Sent: 12 June 2007 10:25
Subject: [omniORB] omniORB server application shutdown



Dear Sir,
just a question to be sure I am doing the right things.
****
-> I develop server application supplying some interfaces using
following:
orb1 = CORBA::ORB_init();
orb1->resolve_initial_references("RootPOA")
poa->activate_object(...);
poa->the_POAManager()->activate();
orb1->run();
****
-> This server acts as client calling some remote interfaces as
well using following:
orb2 = CORBA::ORB_init();
rootContext = orb2->resolve_initial_references("NameService");
obj = rootContext->resolve_str(...);
obj->doSomemting(...);
orb2->destroy();
****
-> To shutdown the appliction I call orb1->shutdown(true)
(unblocking orb1->run())
-> orb1->destroy() looks to be a part of shutdown()
-> Calls running by orb2 are canceled as well (exception
handling is done)
-> Appication goes down (as desired :-)
****
-> Questions :
Is it the right way to shutdown an application having several
activ ORBs doing orb->shutdown() on one of them ?
Are some side effects possible ?

Kind Regards
Evgeni Rojkov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070612/d334dc47/attachment.htm
evgeni.rojkov at durr.com ()
2007-06-12 15:09:17 UTC
Permalink
Thank you for advise !
Is it something omniORB specific ?
Actually I have several ORB_init()s in one process in my Java-Application
running (Java 2, Suns JavaIDL).
I could not reproduce any troubles (yet ?).
Kind Regards,
Evgeni


-----Urspr?ngliche Nachricht-----
Von: Wernke zur Borg [mailto:***@vega.de]
Gesendet: Dienstag, 12. Juni 2007 10:41
An: Rojkov, Evgeni
Cc: omniorb-***@omniorb-support.com
Betreff: RE: [omniORB] omniORB server application shutdown


Hello,

You should not call ORB_init() more than once. Use the same ORB for both
server and client roles.

Regards, Wernke


________________________________

From: omniorb-list-***@omniorb-support.com
[mailto:omniorb-list-***@omniorb-support.com]
Sent: 12 June 2007 10:25
Subject: [omniORB] omniORB server application shutdown



Dear Sir,
just a question to be sure I am doing the right things.
****
-> I develop server application supplying some interfaces using
following:
orb1 = CORBA::ORB_init();
orb1->resolve_initial_references("RootPOA")
poa->activate_object(...);
poa->the_POAManager()->activate();
orb1->run();
****
-> This server acts as client calling some remote interfaces as
well using following:
orb2 = CORBA::ORB_init();
rootContext = orb2->resolve_initial_references("NameService");
obj = rootContext->resolve_str(...);
obj->doSomemting(...);
orb2->destroy();
****
-> To shutdown the appliction I call orb1->shutdown(true)
(unblocking orb1->run())
-> orb1->destroy() looks to be a part of shutdown()
-> Calls running by orb2 are canceled as well (exception
handling is done)
-> Appication goes down (as desired :-)
****
-> Questions :
Is it the right way to shutdown an application having several
activ ORBs doing orb->shutdown() on one of them ?
Are some side effects possible ?

Kind Regards
Evgeni Rojkov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070612/87916810/attachment.htm
Wernke zur Borg
2007-06-12 15:24:04 UTC
Permalink
With omniORB, the ORB is a singleton object. ORB_init() will do real initialisation only for the first call. In subsequent calls it just increments the refcount and returns a pointer to 'the' ORB, so you will get the same pointer with every call. Most probably it does no harm calling it more than once, but it is of not much use either.

Experts please correct me if I'm wrong.

Wernke

________________________________


Subject: AW: [omniORB] omniORB server application shutdown


Thank you for advise !
Is it something omniORB specific ?
Actually I have several ORB_init()s in one process in my Java-Application running (Java 2, Suns JavaIDL).
I could not reproduce any troubles (yet ?).
Kind Regards,
Evgeni


-----Urspr?ngliche Nachricht-----
Betreff: RE: [omniORB] omniORB server application shutdown


Hello,

You should not call ORB_init() more than once. Use the same ORB for both server and client roles.

Regards, Wernke


________________________________

From: omniorb-list-***@omniorb-support.com [mailto:omniorb-list-***@omniorb-support.com]
Sent: 12 June 2007 10:25
Subject: [omniORB] omniORB server application shutdown



Dear Sir,
just a question to be sure I am doing the right things.
****
-> I develop server application supplying some interfaces using following:
orb1 = CORBA::ORB_init();
orb1->resolve_initial_references("RootPOA")
poa->activate_object(...);
poa->the_POAManager()->activate();
orb1->run();
****
-> This server acts as client calling some remote interfaces as well using following:
orb2 = CORBA::ORB_init();
rootContext = orb2->resolve_initial_references("NameService");
obj = rootContext->resolve_str(...);
obj->doSomemting(...);
orb2->destroy();
****
-> To shutdown the appliction I call orb1->shutdown(true) (unblocking orb1->run())
-> orb1->destroy() looks to be a part of shutdown()
-> Calls running by orb2 are canceled as well (exception handling is done)
-> Appication goes down (as desired :-)
****
-> Questions :
Is it the right way to shutdown an application having several activ ORBs doing orb->shutdown() on one of them ?
Are some side effects possible ?

Kind Regards
Evgeni Rojkov


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070612/59c3c0fa/attachment-0001.htm
evgeni.rojkov at durr.com ()
2007-06-12 15:33:30 UTC
Permalink
Thank you !
So this would explain why orb->shutdown() shutdowns "all" ORBs.
Kind Regards,
Evgeni

-----Urspr?ngliche Nachricht-----
Von: Wernke zur Borg [mailto:***@vega.de]
Gesendet: Dienstag, 12. Juni 2007 11:24
An: Rojkov, Evgeni
Cc: omniorb-***@omniorb-support.com
Betreff: RE: [omniORB] omniORB server application shutdown



With omniORB, the ORB is a singleton object. ORB_init() will do real
initialisation only for the first call. In subsequent calls it just increments
the refcount and returns a pointer to 'the' ORB, so you will get the same
pointer with every call. Most probably it does no harm calling it more than
once, but it is of not much use either.

Experts please correct me if I'm wrong.

Wernke

________________________________


Subject: AW: [omniORB] omniORB server application shutdown


Thank you for advise !
Is it something omniORB specific ?
Actually I have several ORB_init()s in one process in my
Java-Application running (Java 2, Suns JavaIDL).
I could not reproduce any troubles (yet ?).
Kind Regards,
Evgeni


-----Urspr?ngliche Nachricht-----
Betreff: RE: [omniORB] omniORB server application
shutdown


Hello,

You should not call ORB_init() more than once. Use the
same ORB for both server and client roles.

Regards, Wernke


________________________________

From: omniorb-list-***@omniorb-support.com
[mailto:omniorb-list-***@omniorb-support.com]
Sent: 12 June 2007 10:25
Subject: [omniORB] omniORB server application shutdown



Dear Sir,
just a question to be sure I am doing the right
things.
****
-> I develop server application supplying some
interfaces using following:
orb1 = CORBA::ORB_init();
orb1->resolve_initial_references("RootPOA")
poa->activate_object(...);
poa->the_POAManager()->activate();
orb1->run();
****
-> This server acts as client calling some
remote interfaces as well using following:
orb2 = CORBA::ORB_init();
rootContext =
orb2->resolve_initial_references("NameService");
obj = rootContext->resolve_str(...);
obj->doSomemting(...);
orb2->destroy();
****
-> To shutdown the appliction I call
orb1->shutdown(true) (unblocking orb1->run())
-> orb1->destroy() looks to be a part of
shutdown()
-> Calls running by orb2 are canceled as well
(exception handling is done)
-> Appication goes down (as desired :-)
****
-> Questions :
Is it the right way to shutdown an application
having several activ ORBs doing orb->shutdown() on one of them ?
Are some side effects possible ?

Kind Regards
Evgeni Rojkov



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security
System.
For more information please visit
http://www.messagelabs.com/email

______________________________________________________________________


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070612/5fae4683/attachment.htm
Loading...