I am using ACE/TAO and having a general question regarding CORBA.
I am facing the scenario where the CORBA server need to return same CORBA object again and again. I am facing server crash while returning the object after two to three times.
I am creating and activating the object once and keep in memory. Then upon client request returning the same object. Hence it is kind of singleton object.
Can anybody suggest whether the given strategy is wrong? Then what is the correct strategy in this scenario.
if(m_pServant== nullptr)
{
m_pServant= create_servant();
PortableServer::ObjectId *oid = m_poa->activate_object(m_pServant.in()); // ref count=2
CORBA::Object_ptr retobj = m_poa->id_to_reference(*oid);
m_XSvc= ::XService::_narrow(retobj);
m_pServant->_remove_ref();
I am using ACE/TAO and having a general question regarding CORBA.
I am facing the scenario where the CORBA server need to return same CORBA object again and again. I am facing server crash while returning the object after two to three times.
I am creating and activating the object once and keep in memory. Then upon client request returning the same object. Hence it is kind of singleton object.
Can anybody suggest whether the given strategy is wrong? Then what is the correct strategy in this scenario.
On 29.09. 15:22, Siddharth Kulkarni wrote:
I am using ACE/TAO and having a general question regarding CORBA.object
I am facing the scenario where the CORBA server need to return same CORBA object again and again. I am facing server crash while returning the
after two to three times.upon
I am creating and activating the object once and keep in memory. Then
client request returning the same object. Hence it is kind of singleton object.
Can anybody suggest whether the given strategy is wrong? Then what is the correct strategy in this scenario.
How exactly are you returning the object? (IDL and implementation code)
Best,
Christian
<div>CORBA::Boolean</div><div>TAO::Ret_Object_SArgument_T<S_ptr,S_var,Insert_Policy>::marshal (TAO_OutputCDR &cdr)</div><div>{</div><div>Â return cdr << this->x_.in ();</div><div>}</div></div><div><br></div><div>Thanks &Regards</div><div>Siddharth</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 29, 2015 at 3:58 PM, Christian Fromme <span dir="ltr"><<a href="mailto:christian@ast.dfs.de" target="_blank">christian@ast.dfs.de</a>></span>
On 29.09. 16:31, Siddharth Kulkarni wrote:
if(m_pServant== nullptr)
{
m_pServant= create_servant();
PortableServer::ObjectId *oid = m_poa->activate_object(m_pServant.in()); // ref count=2
CORBA::Object_ptr retobj = m_poa->id_to_reference(*oid);
m_XSvc= ::XService::_narrow(retobj);
m_pServant->_remove_ref();
Hmm.. Maybe the _remove_ref() call causes the problem?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 11:48:14 |
Calls: | 6,645 |
Calls today: | 5 |
Files: | 12,190 |
Messages: | 5,326,712 |