Domino Code Fragment
| Code Name* Parent property | Date* 06/09/2026 | Source (or email address if you prefer)* [email protected] IP address:.104.23.197.111 | |
| Description* This example prints the name of the database on which the agent is running. | Type* Java | Categories* (Misc) | |
| Implementation: | Required Client: | Server: |
| Limitations: | Comments: | |
public class parentagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
AgentContext ac = s.getAgentContext();
Agent agent = ac.getCurrentAgent();
Database db = agent.getParent();
System.out.println
("Database on which this agent is running is '" +
db.getTitle() + "'");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}