summaryrefslogtreecommitdiff
path: root/TAO/tests/Cache_Growth_Test/Hello.cpp
blob: 038663b416abe97ab373de9bebb14974d768e875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// $Id$
//
#include "Hello.h"
#include "tao/ORB_Core.h"
#include "tao/Transport_Cache_Manager.h"
#include "tao/Thread_Lane_Resources.h"

ACE_RCSID(Hello, Hello, "$Id$")

Hello::Hello (CORBA::ORB_ptr orb)
  : orb_ (CORBA::ORB::_duplicate (orb))
{
}

char *
Hello::get_string (CORBA::Environment &)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
    {
      ACE_ERROR ((LM_ERROR,
                  "(%P|%t) The size is growing \n"));
    }

  return CORBA::string_dup ("Hello there!");
}

void
Hello::shutdown (CORBA::Environment &ACE_TRY_ENV)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  this->orb_->shutdown (0, ACE_TRY_ENV);
}