Setting the User Agent of an Application¶
The user agent is an attribute of the connections to Virtual DataPort. This attribute is a string that has to be set by the client applications.
There are several places that display the user agent of the connections:
Virtual DataPort publishes several MBeans with information about which application opened each connection, performed a request, etc. These MBeans have the attribute
userAgent
.The logs generated by the Denodo Monitor.
The Query Monitor of the administration tool (“Tools” menu)
We recommend setting the user agent attribute from your client applications because it will help you identify the requests performed by a particular application. This is very useful for debugging problems caused by a particular client or for logging purposes.
The user agent is set in a different way depending on the type of client:
JDBC clients: add the parameter
userAgent
to the JDBC URL. For example,jdbc:vdb://localhost:9999/testing?userAgent=MyApplication
Alternatively, you can add
userAgent
as a driver property instead of a parameter of the URL.ODBC clients:
For a DSN created on Windows, see the section Set Up a DSN on Windows of the Developer Guide.
For a DSN created on Linux, see the section Configure the DSN in UnixODBC of the Developer Guide.
JMS clients: set the property
userAgent
in the JMS message. For example:
javax.jms.TextMessage message = session.createTextMessage(QUERY);
message.setStringProperty("userAgent", "userAgentValueJMS");
Administration tool: open the dialog Connection on the menu Tools > Admin Tool preferences and change the value of the box User agent.
The user agent is not configurable for other types of clients.