IBM HATS provides advanced customization options to create future proof, rich & complex web applications. This can be achieved by using Macros, Integration Objects and ReST APIs. Along with that, if Integration Objects can get access to the transformation connection (HATS web connection), it enables easy integration of HATS applications with third party applications.
HATS provides Connection Management APIs, which can be used to acquire the transformation connection (also referred to as the "default connection") in a servlet context. This is in anticipation of executing an Integration Object against that transformation connection. The purpose of this API is to provide better integration between HATS applications and other, non-HATS Web applications.
The API consists of two static methods, acquireExistingTransformationConnection and releaseExistingTransformationConnection, added to the RuntimeFunctions class in the com.ibm.hats.runtime package.
The signatures of these methods are as follows:
public static final String acquireExistingTransformationConnection(HttpServletRequest request) throws HostConnectionException, ApplicationUnavailableException
public static final void releaseExistingTransformationConnection(HttpServletRequest request)
If you have a scenario in which you are displaying HATS custom page and want to make a background transaction to extract/send data from/to the same connection without changing the active transformation page, then these APIs are best suitable to use the same transformation connection in the background through Integration Objects and make te traction without changing the active transformation.
Below is a sample code which explains how to use these APIs in a non-HATS jsp page. Similarly, you can use these APIs in a java file/servlet and invoke using specific paths.
In this sample observe the comments next to each of the method calls, which explains the significance of each of those APIs used.
For more details on these APIs, refer the below link and search for “Connection management API” in the page
Note: Ensure that transformation connection busy time is handled correctly. Otherwise, you will end up getting application busy page for web transformation and application unavailable issues for Integration Objects.
Chief Architect, IBM Host Access Transformation Services