About this task
Installing an Agent into a Servlet container (for example, Apache Tomcat or Jetty):
Procedure
-
The Agent needs to be deployed with the customer's application. The
best way to install the agent is to add it to the classpath using a
Maven dependency:
<dependency> <groupId>org.talend.esb</groupId> <artifactId>sam-agent</artifactId> <version>{talend esb version}</version> </dependency>
-
With Spring, the Agent has to be added to the Spring context:
<import resource="classpath:META-INF/tesb/agent-context.xml"/>
-
Then, add the Agent as a
jaxws:features
to the endpoint/client for Spring-related services, for example:<import resource="classpath:/META-INF/tesb/agent-context.xml" /> <jaxws:client id="customerService" address="/CustomerServicePort" implementor="com.example.customerservice.server.CustomerServiceImpl"> <jaxws:features> <ref bean="eventFeature"/> </jaxws:features> </jaxws:client>
The Agent supports JMS and HTTP/HTTPS transport types in the same way.