Domino Code Fragment
| Code Name* ServerName property | Date* 06/09/2026 | Source (or email address if you prefer)* [email protected] IP address:.104.23.197.110 | |
| 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();
}
}
}