On Thu, 27 Jul 2006, Laurent Marzullo wrote:
Hello,I'm still trying to propagate my TransactionCurrent object. So, now, I'm on 'send_request' of my client interceptor. in case where there's no OTSPolicy defined for my target object (here my code) ----------------------------------------------------------------------------- CosTransactions::OTSPolicy_var ots = CosTransactions::OTSPolicy::_nil(); try { CORBA::Policy_var p = rqst_info->target()->_get_policy( CosTransactions::OTS_POLICY_TYPE ); ots = CosTransactions::OTSPolicy::_narrow( p ); } catch ( CORBA::BAD_PARAM& ) { std::cerr << " -> No OTS_POLICY_TYPE find for object\n"; /* CosTransactions::TransactionalObject_var to = CosTransactions::TransactionalObject::_narrow( rqst_info->target() ); if ( !CORBA::is_nil( to ) ) { std::cerr << " -> Setting OTS_POLICY_VALUE to ADAPTS \n"; CORBA::Any policyValue; policyValue <<= CosTransactions::ADAPTS; CORBA::Policy_var p = _orb_var->create_policy( CosTransactions::OTS_POLICY_TYPE , policyValue ); ots = CosTransactions::OTSPolicy::_narrow( p ); } */ } ----------------------------------------------------------------------------- I would like to test if the target object inherite from 'TransactionalObject' to be compliant with OTS 1.1 object (I know that is not a mandatory stuf but I would like to do it). So, I've wrotte the above code (in comment). But this code seem to loop because of the _narrow that call the server and then the ClientRequestInterceptor. I just want to know the better way to avoid this loop ? 1) idl --do-not-query-server-for-narrow 2) forget about 'TransactionalObject' 3) any other ?
3 is right! Please see how you can use PICurrent to deal with call loop. Cheers, Karel -- Karel Gardas [EMAIL PROTECTED] ObjectSecurity Ltd. http://www.objectsecurity.com --- Need experienced, fast, reliable technical MICO support? ---> http://www.objectsecurity.com/mico_commsup_referral.html <--- --- _______________________________________________ Mico-devel mailing list [email protected] http://www.mico.org/mailman/listinfo/mico-devel
