Author Message
MichaelNorman
Joined: Jun 3, 2015
Messages: 448
Offline
Apologies for cross post, I put this in client forum by mistake.

I have a need to initialize an external logger during the LifeCycle init method so that attributes will be available during TheCallListener startup.

I would like to be able to get the Node information where the service is running. I am able to get the Cluster information, but I would like to know which Node instance I'm currently running on. I know this is available once a call is intercepted, but I am looking to be able to obtain this information during the LifeCycle init phase.

I also see that Cluster.getNodeStatus() is available, but this returns ALL nodes, not just the one node I'm currently on.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
THis code snippet should do the trick.

private String getIpAddressForThisEdp()
{
try
{
final ZephyrDM zephyrDM = (ZephyrDM) DMFactory.getInstance().getDataMgr(ZephyrDM.class);
if (zephyrDM != null && zephyrDM.getMyAusInstance() != null)
{
return zephyrDM.getMyAusInstance().getManagementAccessPointHostName();
}
}
catch (final Exception e)
{
logger.error(
"getIpAddressForThisEdp Exception while trying to retrieve the management access port name: " + e);
}

return null;
}
Go to:   
Mobile view