summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-08-02 06:32:28 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-08-02 06:32:28 +0000
commitf50cebbcee2d1d61d6c7a2290d5e345164084758 (patch)
tree81113128a25547a6e77c7ea58402f85c6953b22a /TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
parent845947a139630cb84a191d93973d42cca09bd0b2 (diff)
downloadATCD-f50cebbcee2d1d61d6c7a2290d5e345164084758.tar.gz
ChangeLogTag: Mon Aug 2 06:31:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp35
1 files changed, 22 insertions, 13 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
index 8cc97deb95c..45bf3384dc4 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
@@ -357,31 +357,40 @@ be_visitor_amh_operation_ss::generate_shared_section (be_decl *node,
// Create the response handler
char *buf;
- intf->compute_full_name ("AMH_", "ResponseHandler", buf);
- ACE_CString response_handler_name (buf);
- delete [] buf;
- buf = 0;
-
intf->compute_full_name ("TAO_AMH_", "ResponseHandler", buf);
ACE_CString response_handler_implementation_name ("POA_");
response_handler_implementation_name += buf;
delete [] buf;
buf = 0;
- *os << be_nl << response_handler_name.c_str ()
- << "_ptr _tao_rh_ptr;" << be_nl
- << "ACE_NEW (" << be_idt << be_idt_nl
- << "_tao_rh_ptr," << be_nl
+ *os << be_nl
+ << "TAO_AMH_BUFFER_ALLOCATOR* amh_allocator =" << be_idt_nl
+ << "_tao_server_request.orb()->orb_core ()->lane_resources().amh_response_handler_allocator();" << be_uidt_nl << be_nl
+ << "TAO::TAO_Buffer_Allocator<"
+ << response_handler_implementation_name.c_str ()
+ << ", TAO_AMH_BUFFER_ALLOCATOR> buffer_allocator (amh_allocator);"
+ << be_nl << be_nl
+ << response_handler_implementation_name.c_str ()
+ << "_ptr _tao_rh_ptr = "
+ << be_idt_nl
+ << "buffer_allocator.allocate();"
+ << be_uidt_nl << be_nl
+ << "if (!_tao_rh_ptr) " << be_idt_nl << "ACE_THROW (CORBA::NO_MEMORY ());"
+ << be_uidt_nl;
+
+ // Initialize amh rh
+ *os << be_nl << "_tao_rh_ptr->init (_tao_server_request, amh_allocator);" << be_nl
+ << be_nl;
+
+ *os << "ACE_Utils::Auto_Functor <"
<< response_handler_implementation_name.c_str ()
- << " (_tao_server_request)" << be_uidt_nl
- << ");" << be_uidt_nl
- << response_handler_name.c_str () << "_var _tao_rh = _tao_rh_ptr;"
+ << ", TAO::ARH_Refcount_Functor> safe_rd_(_tao_rh_ptr);"
<< be_nl;
// Make the upcall.
*os << be_nl << "_tao_impl->"
<< node->local_name () << " (" << be_idt << be_idt_nl
- << "_tao_rh.in ()";
+ << "safe_rd_.get ()";
return 0;
}