Domino Code Fragment
Code Name* ServerName property | Date* 04/28/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.3.144.97.189 | |
Description* 1. This script prints the name and server name of the current agent. | Type* Java | Categories* (Misc) |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class serveragent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
AgentContext ac = s.getAgentContext();
Agent agent = ac.getCurrentAgent();
String sn = agent.getServerName();
if (sn == null)
sn = "Local";
System.out.println
("Current Agent " + agent.getName() +
" is running on this server - " + sn);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}