summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-21 14:51:21 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-21 14:51:21 +0000
commit5f96779192e735b7cc68db1abd6d3691b03f7bcf (patch)
treedc7a332adedc77447bb36263ddfd26e36ca012be
parentbbf00befe345a8b1f9b95e8bf9174ffcece98cdc (diff)
downloadATCD-5f96779192e735b7cc68db1abd6d3691b03f7bcf.tar.gz
Version for Nanbor to test.
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/Impl_Repo.idl1
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl2
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/client.dsp55
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/client_impl.cpp10
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/implrepo.dsp26
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.cpp130
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h23
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/server.dsp37
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/server_impl.cpp23
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp1
10 files changed, 245 insertions, 63 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/Impl_Repo.idl b/TAO/orbsvcs/tests/ImplRepo/Impl_Repo.idl
index b30ac20df20..88cb24d07e0 100644
--- a/TAO/orbsvcs/tests/ImplRepo/Impl_Repo.idl
+++ b/TAO/orbsvcs/tests/ImplRepo/Impl_Repo.idl
@@ -121,6 +121,7 @@ interface Implementation_Repository
// in INET_Addr addr,
// in Ping_Object ping);
void server_is_running (in string server,
+ inout Object obj,
in INET_Addr addr);
// Used to notify the Implementation Repository that <server> is alive and
diff --git a/TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl b/TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl
index a6bd9105193..34fffdef395 100644
--- a/TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl
+++ b/TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl
@@ -11,6 +11,6 @@ interface simple_object
long simple_method (in long l);
// cube a long
- oneway void shutdown ();
+ void shutdown ();
// shutdown the application.
};
diff --git a/TAO/orbsvcs/tests/ImplRepo/client.dsp b/TAO/orbsvcs/tests/ImplRepo/client.dsp
index 465981fcec7..f451152652e 100644
--- a/TAO/orbsvcs/tests/ImplRepo/client.dsp
+++ b/TAO/orbsvcs/tests/ImplRepo/client.dsp
@@ -17,13 +17,12 @@ CFG=ImplRepoTest Client - Win32 Release
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "ImplRepoTest Client - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "ImplRepoTest Client - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
+!MESSAGE "ImplRepoTest Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ImplRepoTest Client - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
+# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
@@ -77,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
!ENDIF
@@ -122,12 +121,13 @@ SOURCE=.\Simple_Object.idl
!IF "$(CFG)" == "ImplRepoTest Client - Win32 Release"
-# Begin Custom Build
+USERDEP__SIMPL="..\..\..\..\bin\Release\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Simple_Object.idl
InputName=Simple_Object
BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
+ tao_idl $(InputName).idl
"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -137,16 +137,35 @@ BuildCmds= \
"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ImplRepoTest Client - Win32 Debug"
-# Begin Custom Build
+USERDEP__SIMPL="..\..\..\..\bin\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Simple_Object.idl
InputName=Simple_Object
BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
+ tao_idl $(InputName).idl
"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -156,6 +175,24 @@ BuildCmds= \
"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
# End Custom Build
!ENDIF
diff --git a/TAO/orbsvcs/tests/ImplRepo/client_impl.cpp b/TAO/orbsvcs/tests/ImplRepo/client_impl.cpp
index 832ebcf2e13..4822865a12f 100644
--- a/TAO/orbsvcs/tests/ImplRepo/client_impl.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/client_impl.cpp
@@ -93,10 +93,12 @@ Client_i::cube_long (int i)
{
// Cube a long.
CORBA::Long ret_long;
- {
- ret_long = this->server_->simple_method (i, this->env_);
- }
+ ACE_OS::sleep (2);
+ ret_long = this->server_->simple_method (i, this->env_);
+ //this->server_->shutdown (this->env_);
+ //ACE_OS::sleep (2);
+// ACE_DEBUG ((LM_DEBUG, "FOO!!! %d\n", i));
ACE_DEBUG ((LM_DEBUG, "The cube of %d is %d\n", i, ret_long));
if (this->env_.exception () != 0)
@@ -125,7 +127,7 @@ Client_i::run ()
{
u_int i;
- for (i = 0; i < this->loop_count_; i++)
+ for (i = 1; i <= this->loop_count_; i++)
this->cube_long (i);
if (this->shutdown_)
diff --git a/TAO/orbsvcs/tests/ImplRepo/implrepo.dsp b/TAO/orbsvcs/tests/ImplRepo/implrepo.dsp
index c4390495e3c..e8b5f3fbc7d 100644
--- a/TAO/orbsvcs/tests/ImplRepo/implrepo.dsp
+++ b/TAO/orbsvcs/tests/ImplRepo/implrepo.dsp
@@ -17,13 +17,12 @@ CFG=ImplRepoTest ImplRepo - Win32 Release
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "ImplRepoTest ImplRepo - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "ImplRepoTest ImplRepo - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
+!MESSAGE "ImplRepoTest ImplRepo - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ImplRepoTest ImplRepo - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
+# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
@@ -131,12 +130,22 @@ SOURCE=.\Impl_Repo.idl
!IF "$(CFG)" == "ImplRepoTest ImplRepo - Win32 Release"
-# Begin Custom Build
+USERDEP__IMPL_="..\..\..\..\bin\Release\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Impl_Repo.idl
InputName=Impl_Repo
BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
+ tao_idl $(InputName).idl
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -159,12 +168,13 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "ImplRepoTest ImplRepo - Win32 Debug"
-# Begin Custom Build - Invoking TAO_IDL compiler
+USERDEP__IMPL_="..\..\..\..\bin\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Impl_Repo.idl
InputName=Impl_Repo
BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
+ tao_idl $(InputName).idl
"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.cpp b/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.cpp
index 2ad1c1da9b9..193a3c97be3 100644
--- a/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.cpp
@@ -28,25 +28,26 @@ void IR_iRepo_i::start (const char *server)
proc.spawn (proc_opts);
ACE_OS::sleep (2);
- }
+ }
}
void IR_iRepo_i::server_is_running (const char *server,
- const Implementation_Repository::INET_Addr &addr,
- CORBA::Environment &_tao_environment)
+ CORBA::Object_ptr &obj,
+ const Implementation_Repository::INET_Addr &addr,
+ CORBA::Environment &_tao_environment)
{
ACE_DEBUG ((LM_DEBUG, "Server is running!\n"));
- int result = this->read_ior (this->server_input_file_);
- if (result < 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- this->server_input_file_));
- return;
- }
- CORBA::Object_var server_object =
- this->orb_manager_.orb ()->string_to_object (this->server_key_, _tao_environment);
- this->server_impl_->forward_to (server_object.in ());
+// int result = this->read_ior (this->server_input_file_);
+// if (result < 0)
+// {
+// ACE_ERROR ((LM_ERROR,
+// "Unable to read ior from %s : %p\n",
+// this->server_input_file_));
+// return;
+// }
+// CORBA::Object_var server_object =
+// this->orb_manager_.orb ()->string_to_object (this->server_key_, _tao_environment);
+ this->server_impl_->forward_to (obj);
}
@@ -132,13 +133,14 @@ IR_iRepo_i::init (int argc, char** argv, CORBA::Environment& env)
return retval;
this->server_impl_ = new IR_Simple_i (this->orb_manager_.orb (),
- this->orb_manager_.child_poa (),
- this);
+ this->orb_manager_.child_poa (),
+ this);
CORBA::String_var str =
- this->orb_manager_.activate_under_child_poa ("server",
- this->server_impl_,
- env);
+ this->orb_manager_.activate_under_child_poa ("server",
+ this->server_impl_,
+ env);
+
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "The server IOR is: <%s>\n", str.in ()));
@@ -177,6 +179,90 @@ IR_iRepo_i::~IR_iRepo_i (void)
delete server_impl_;
}
+IR_Adapter_Activator::IR_Adapter_Activator (PortableServer::Servant servant)
+: servant_ (servant)
+{
+ // Nothing
+}
+
+
+CORBA::Boolean
+IR_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
+ const char *name,
+ CORBA_Environment &env)
+{
+ CORBA::PolicyList policies (2);
+ policies.length (2);
+
+ // Request Processing Policy
+ policies[0] =
+ parent->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT, env);
+ if (env.exception () != 0)
+ {
+ env.print_exception ("unknown_adapter::create_request_processing_policy");
+ return -1;
+ }
+
+ // Servant Retention Policy
+ policies[1] =
+ parent->create_servant_retention_policy (PortableServer::RETAIN, env);
+ if (env.exception () != 0)
+ {
+ env.print_exception ("unknown_adapter::create_servant_retention_policy");
+ return -1;
+ }
+
+ PortableServer::POA_var child = parent->create_POA (name,
+ PortableServer::POAManager::_nil (),
+ policies,
+ env);
+ if (env.exception () != 0)
+ return 0;
+
+ for (CORBA::ULong i = 0;
+ i < policies.length () && env.exception () == 0;
+ ++i)
+ {
+ CORBA::Policy_ptr policy = policies[i];
+ policy->destroy (env);
+ }
+
+ if (env.exception () != 0)
+ {
+ env.print_exception ("unknown_adapter::policy->destroy");
+ return -1;
+ }
+
+ PortableServer::AdapterActivator_var activator = this->_this (env);
+ if (env.exception () != 0)
+ {
+ child->destroy (0, 0, env);
+ return 0;
+ }
+
+ child->the_activator (activator.in (), env);
+
+ if (env.exception () != 0)
+ {
+ child->destroy (0, 0, env);
+ return 0;
+ }
+
+ child->set_servant (this->servant_);
+
+ if (env.exception () != 0)
+ {
+ env.print_exception ("unknown_adapter, set_servant");
+ child->destroy (0, 0, env);
+ return 0;
+ }
+
+ // Finally everything is fine
+ return 1;
+}
+
+
+
// Constructor
IR_Simple_i::IR_Simple_i (CORBA::ORB_ptr orb_ptr,
@@ -213,9 +299,11 @@ void IR_Simple_i::shutdown (CORBA::Environment &env)
int IR_Simple_i::forward (CORBA::Environment &env)
{
this->ir_impl_->start ("Simple_Server");
-
+ ACE_DEBUG ((LM_DEBUG, "Forwarding...\n"));
if (!CORBA::is_nil (this->forward_to_var_.in ()))
{
+ env.exception (new PortableServer::ForwardRequest (this->forward_to_var_));
+/*
ACE_DEBUG ((LM_DEBUG, "Forwarding...\n"));
PortableServer::ObjectId_var oid =
@@ -238,7 +326,7 @@ int IR_Simple_i::forward (CORBA::Environment &env)
tao_poa->forward_object (oid.in (),
this->forward_to_var_.in (),
- env);
+ env);*/
return 0;
}
else
diff --git a/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h b/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h
index 27011db560f..acc872f2ee1 100644
--- a/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h
+++ b/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h
@@ -33,7 +33,7 @@ typedef IR_iRepo_i_ptr IR_iRepo_i_ref;
typedef IR_Simple_i *IR_Simple_i_ptr;
typedef IR_Simple_i_ptr IR_Simple_i_ref;
-class IR_iRepo_i : public POA_iementation_Repository
+class IR_iRepo_i : public POA_Implementation_Repository
{
// = TITLE
// Implementation Repository
@@ -52,6 +52,7 @@ public:
// CORBA::Environment &_tao_environment);
virtual void server_is_running (const char *server,
+ CORBA::Object_ptr &obj,
const Implementation_Repository::INET_Addr &addr,
CORBA::Environment &_tao_environment);
@@ -94,6 +95,26 @@ private:
// The command line arguments.
};
+class IR_Adapter_Activator : public POA_PortableServer::AdapterActivator
+{
+ // = TITLE
+ // Implementation Repository Adapter Activator
+ //
+ // = DESCRIPTION
+ // Part of the Default Servant/DSI combination that forwards
+ // arbitrary requests. This allows for the setting up of child POAs
+ // with default servants.
+public:
+ // Constructor
+ IR_Adapter_Activator (PortableServer::Servant servant);
+
+ virtual CORBA::Boolean unknown_adapter (PortableServer::POA_ptr parent,
+ const char *name,
+ CORBA_Environment &_env = CORBA_Environment::default_environment ());
+private:
+ PortableServer::Servant &servant_;
+};
+
class IR_Simple_i: public POA_simple_object
{
diff --git a/TAO/orbsvcs/tests/ImplRepo/server.dsp b/TAO/orbsvcs/tests/ImplRepo/server.dsp
index 3761d2dc928..2a908c8ade0 100644
--- a/TAO/orbsvcs/tests/ImplRepo/server.dsp
+++ b/TAO/orbsvcs/tests/ImplRepo/server.dsp
@@ -17,13 +17,12 @@ CFG=ImplRepoTest Server - Win32 Release
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "ImplRepoTest Server - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "ImplRepoTest Server - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
+!MESSAGE "ImplRepoTest Server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ImplRepoTest Server - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
+# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
@@ -77,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
!ENDIF
@@ -142,12 +141,22 @@ SOURCE=.\Simple_Object.idl
!IF "$(CFG)" == "ImplRepoTest Server - Win32 Release"
-# Begin Custom Build
+USERDEP__SIMPL="..\..\..\..\bin\Release\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Simple_Object.idl
InputName=Simple_Object
BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
+ tao_idl $(InputName).idl
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -170,12 +179,22 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "ImplRepoTest Server - Win32 Debug"
-# Begin Custom Build
+USERDEP__SIMPL="..\..\..\..\bin\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Simple_Object.idl
InputName=Simple_Object
BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
+ tao_idl $(InputName).idl
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/TAO/orbsvcs/tests/ImplRepo/server_impl.cpp b/TAO/orbsvcs/tests/ImplRepo/server_impl.cpp
index da31be083f8..282212ebc2b 100644
--- a/TAO/orbsvcs/tests/ImplRepo/server_impl.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/server_impl.cpp
@@ -68,8 +68,8 @@ Server_i::init (int argc, char** argv, CORBA::Environment& env)
CORBA::String_var str =
this->orb_manager_.activate_under_child_poa ("server",
- &this->server_impl,
- TAO_TRY_ENV);
+ &this->server_impl,
+ TAO_TRY_ENV);
TAO_CHECK_ENV;
if (TAO_debug_level > 0)
@@ -79,13 +79,6 @@ Server_i::init (int argc, char** argv, CORBA::Environment& env)
this->read_ir_ior ();
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_, "%s", str.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
-
CORBA::Object_var implrepo_object =
this->orb_manager_.orb ()->string_to_object (this->ir_server_key_, TAO_TRY_ENV);
TAO_CHECK_ENV;
@@ -101,7 +94,17 @@ Server_i::init (int argc, char** argv, CORBA::Environment& env)
-1);
Implementation_Repository::INET_Addr addr;
- ImplRepo->server_is_running ("Simple_Server", addr, TAO_TRY_ENV);
+
+ CORBA::Object_var server_object =
+ this->orb_manager_.orb ()->string_to_object (str, env);
+
+ ImplRepo->server_is_running ("Simple_Server", server_object, addr, TAO_TRY_ENV);
+
+ if (this->ior_output_file_)
+ {
+ ACE_OS::fprintf (this->ior_output_file_, "%s", server_object.in ());
+ ACE_OS::fclose (this->ior_output_file_);
+ }
}
TAO_CATCHANY
diff --git a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp b/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp
index 0256b5e2b77..4d92ba290fd 100644
--- a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp
@@ -25,6 +25,7 @@ Simple_i::simple_method (CORBA::Long l, CORBA::Environment &env)
{
ACE_DEBUG ((LM_DEBUG, "Simple Method\n"));
ACE_UNUSED_ARG (env);
+ TAO_ORB_Core_instance ()->orb ()->shutdown ();
return l * l * l;
}