Auto-Registering in the Servlet Mode
The following example shows how the TeaAgentServlet can be configured to auto-register itself.
public class HelloWorldAgentServlet extends TeaAgentServlet{ private static final long serialVersionUID = 8327019718482894467L; @Override public void init() throws ServletException { super.init(); this.autoRegisterAgent("http://localhost:8777", "http://localhost:8080"); } @Override protected Object[] getObjectInstances() throws ServletException { return new Object[] {new HelloWorld()}; } }After making a call to the init method in the super class of TeaAgentServlet, call thecom.tibco.tea.agent.server.TeaAgentServlet.autoRegisterAgent() method.
Related concepts
Copyright © Cloud Software Group, Inc. All rights reserved.