HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.HostPublisher.IntegrationObject
Class HPubPoolFactory

java.lang.Object
  extended by com.ibm.HostPublisher.IntegrationObject.HPubPoolFactory

public class HPubPoolFactory
extends Object

The HPubPoolFactory can be used to specify connection overrides when using an existing Integration Object, without recompile it.

Use the create() method to create a new connection pool definition based on the Integration Object connection pool and the connection overrides. The new pool name must be set on the Integration Object using the instance method setHPubStartPoolName() before calling the doHPTransaction() or processRequest() business methods.

See Also:
HPubCommon.setHPubStartPoolName(String)

Constructor Summary
HPubPoolFactory()
           
 
Method Summary
static String create(String poolName, Properties overrides, javax.servlet.http.HttpServletRequest httpServletRequest)
          Create a new pool definition based on the pool definition and the connection overrides in input.
static String create(String poolName, String overrides, javax.servlet.http.HttpServletRequest httpServletRequest)
          Create a new pool definition based on the pool definition and the connection overrides in input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HPubPoolFactory

public HPubPoolFactory()
Method Detail

create

public static String create(String poolName,
                            String overrides,
                            javax.servlet.http.HttpServletRequest httpServletRequest)
Create a new pool definition based on the pool definition and the connection overrides in input.

The new pool name must be set on the Integration Object using the instance method setHPubStartPoolName() before calling the doHPTransaction() or processRequest() business methods of the Integration Object establishing the host connection.

Sample code:

    String  overrides = "LUName=LU000001,host=ralvms"  
    String poolName = ExampleIO.getHPubStartPoolName(); 
    String newPoolName = HPubPoolFactory.create(poolName, overrides, null ); 
    if (newPoolName != null) { 
         ExampleIO.setHPubStartPoolName(newPoolName); 
         ExampleIO.processRequest();
    }
 

Parameters:
poolName - The pool definition to use as basis for the new pool definition. The pool name must be qualified with the HATS application name, for example my_hats_project/main, if httpServletRequest=null.
overrides - The overrides in the format "key1=value1,key2=value2" to apply when establishing a connection
httpServletRequest - The httpServletRequest or null
Returns:
The name of the new pool definition or null if the pool name in input is invalid
See Also:
HPubCommon.setHPubStartPoolName(String)

create

public static String create(String poolName,
                            Properties overrides,
                            javax.servlet.http.HttpServletRequest httpServletRequest)
Create a new pool definition based on the pool definition and the connection overrides in input.

The new pool name must be set on the Integration Object using the instance method setHPubStartPoolName() before calling the doHPTransaction() or processRequest() business methods of the Integration Object establishing the host connection.

Sample code:

    java.util.Properties overrides = new java.util.Properties(); 
    overrides.setProperty("LUName", "LU000001");  
    String poolName = ExampleIO.getHPubStartPoolName();  
    String newPoolName = HPubPoolFactory.create(poolName, overrides, request ); 
if (newPoolName != null) { ExampleIO.setHPubStartPoolName(newPoolName); ExampleIO.doHPTransaction(request,response); }

Parameters:
poolName - The pool definition to use as basis for the new pool definition. The pool name must be qualified with the HATS application name, for example my_hats_project/main, if httpServletRequest=null.
overrides - The connection overrides to apply when establishing a connection
httpServletRequest - The httpServletRequest or null
Returns:
The name of the new pool definition or null if the pool name in input is invalid
See Also:
HPubCommon.setHPubStartPoolName(String)

HATS 7.5.1 (201005110649)