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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
// $Id$
#include "Best_Effort.h"
#include "dance/Deployment/Deployment_StartErrorC.h"
#include "dance/DAnCE_PropertiesC.h"
#include "dance/DAnCE_Utility.h"
#include "dance/Logger/Log_Macros.h"
namespace DAnCE
{
// Implementation skeleton constructor
Best_Effort::Best_Effort (void)
{
}
// Implementation skeleton destructor
Best_Effort::~Best_Effort (void)
{
}
void
Best_Effort::configure (const ::Deployment::Properties & )
{
}
void
Best_Effort::post_install (const ::Deployment::DeploymentPlan &plan,
::CORBA::ULong index,
const ::CORBA::Any &,
const ::CORBA::Any &exception)
{
if (exception.type() != ::CORBA::_tc_null)
{
std::string result;
DAnCE::Utility::stringify_exception_from_any (exception,
result);
DANCE_ERROR (DANCE_LOG_NONFATAL_ERROR,
(LM_ERROR, DLINFO
ACE_TEXT ("Best_Effort::post_install - ")
ACE_TEXT ("Received exception while installing instance ")
ACE_TEXT ("<%C>:<%C>\n"),
plan.instance[index].name.in (),
result.c_str ()));
}
}
void
Best_Effort::post_connect (const ::Deployment::DeploymentPlan &plan,
::CORBA::ULong connection,
const ::CORBA::Any &exception)
{
if (exception.type() != ::CORBA::_tc_null)
{
std::string result;
DAnCE::Utility::stringify_exception_from_any (exception,
result);
DANCE_ERROR (DANCE_LOG_NONFATAL_ERROR,
(LM_ERROR, DLINFO
ACE_TEXT ("Best_Effort::post_connect - ")
ACE_TEXT ("Received exception while establishing connection ")
ACE_TEXT ("<%C>:<%C>\n"),
plan.connection[connection].name.in (),
result.c_str ()));
}
}
void
Best_Effort::post_configured (const ::Deployment::DeploymentPlan & plan,
::CORBA::ULong index,
const ::CORBA::Any &exception )
{
if (exception.type() != ::CORBA::_tc_null)
{
std::string result;
DAnCE::Utility::stringify_exception_from_any (exception,
result);
DANCE_ERROR (DANCE_LOG_NONFATAL_ERROR,
(LM_ERROR, DLINFO
ACE_TEXT ("Best_Effort::post_configured - ")
ACE_TEXT ("Received exception while completing configuration of ")
ACE_TEXT ("instance <%C>:<%C>\n"),
plan.instance[index].name.in (),
result.c_str ()));
}
}
void
Best_Effort::post_activate (const ::Deployment::DeploymentPlan & plan,
::CORBA::ULong index,
const ::CORBA::Any & exception)
{
if (exception.type() != ::CORBA::_tc_null)
{
std::string result;
DAnCE::Utility::stringify_exception_from_any (exception,
result);
DANCE_ERROR (DANCE_LOG_NONFATAL_ERROR,
(LM_ERROR, DLINFO
ACE_TEXT ("Best_Effort::post_activate - ")
ACE_TEXT ("Received exception while activating instance ")
ACE_TEXT ("<%C>:<%C>\n"),
plan.instance[index].name.in (),
result.c_str ()));
}
}
void
Best_Effort::post_passivate (const ::Deployment::DeploymentPlan & plan,
::CORBA::ULong index,
const ::CORBA::Any & exception)
{
if (exception.type() != ::CORBA::_tc_null)
{
std::string result;
DAnCE::Utility::stringify_exception_from_any (exception,
result);
DANCE_ERROR (DANCE_LOG_NONFATAL_ERROR,
(LM_ERROR, DLINFO
ACE_TEXT ("Best_Effort::post_passivate - ")
ACE_TEXT ("Received exception while passivating instance ")
ACE_TEXT ("<%C>:<%C>\n"),
plan.instance[index].name.in (),
result.c_str ()));
}
}
void
Best_Effort::post_remove (const ::Deployment::DeploymentPlan & plan,
::CORBA::ULong index,
const ::CORBA::Any & exception)
{
if (exception.type() != ::CORBA::_tc_null)
{
std::string result;
DAnCE::Utility::stringify_exception_from_any (exception,
result);
DANCE_ERROR (DANCE_LOG_NONFATAL_ERROR,
(LM_ERROR, DLINFO
ACE_TEXT ("Best_Effort::post_remove - ")
ACE_TEXT ("Received exception while removing instance ")
ACE_TEXT ("<%C>:<%C>\n"),
plan.instance[index].name.in (),
result.c_str ()));
}
}
}
extern "C"
{
::DAnCE::DeploymentInterceptor_ptr
create_DAnCE_Best_Effort (void)
{
return new DAnCE::Best_Effort ();
}
}
|