Topic
  • 4 replies
  • Latest Post - ‏2012-10-10T10:05:23Z by SanthiRamala
DaudpotoAnees
DaudpotoAnees
11 Posts

Pinned topic How Dyanmically Change Host Name in main.hco

‏2012-09-20T02:30:40Z |
Hi All,

I believe this might be the common issue in any HATS project so would appreciate if anyone is able to help me on this, Here is the detail description of the problem

I have developed one HATS web-service project with Chained Integration Objects and currently main.hco connection file is pointing to one host i-e: HOSTAB and I have created the EAR file of my project and deployed on WAS server.

Now my client wants me to create a single EAR that can work for all the environments likewise SIT, UAT,Production as host name changes according to the different environments.

I know I can simply extract the EAR file and make changes in the main.hco file but to me that is not the standard way so let me know if you have any solution to change the host name dynamically.

Thanks
DaudpotoAnees
Updated on 2012-10-10T10:05:23Z at 2012-10-10T10:05:23Z by SanthiRamala
  • tmparker
    tmparker
    534 Posts

    Re: How Dyanmically Change Host Name in main.hco

    ‏2012-09-24T13:07:50Z  
    You always have the option of using Connection overrides to dynamically change the host name at runtime. For IOs you would need to follow the instructions in the sections entitled "Specifying Connection Overrides" on this page, http://publib.boulder.ibm.com/infocenter/hatshelp/v80/topic/com.ibm.hats.doc/doc/pgintobj.htm.

    Thanks
    Tim
  • DaudpotoAnees
    DaudpotoAnees
    11 Posts

    Re: How Dyanmically Change Host Name in main.hco

    ‏2012-09-25T06:46:48Z  
    • tmparker
    • ‏2012-09-24T13:07:50Z
    You always have the option of using Connection overrides to dynamically change the host name at runtime. For IOs you would need to follow the instructions in the sections entitled "Specifying Connection Overrides" on this page, http://publib.boulder.ibm.com/infocenter/hatshelp/v80/topic/com.ibm.hats.doc/doc/pgintobj.htm.

    Thanks
    Tim
    Hi Tim,

    I am still not able to implement the solution successfully can you please guide me where to write this code as I have Login macro, Login Integration Object and the web service support files.

    Thanks
  • tmparker
    tmparker
    534 Posts

    Re: How Dyanmically Change Host Name in main.hco

    ‏2012-09-26T13:25:06Z  
    Hi Tim,

    I am still not able to implement the solution successfully can you please guide me where to write this code as I have Login macro, Login Integration Object and the web service support files.

    Thanks
    Sorry, I can't really tell you where you should put this in your code as I don't know how your project is designed to work. The basic information you need to understand is the following statement which is in the InfoCenter.

    "To specify connection overrides on Integration Objects, the user needs to modify the code accessing the Integration Object to call the Integration Object instance methods setHPubConnectionOverrides(Properties overrides) or setHPubConnectionOverrides(String overrides) before calling the doHPTransaction() or processRequest() methods."

    You need to call setHPubConnectionOverrides before you execute the transaction.
  • SanthiRamala
    SanthiRamala
    39 Posts

    Re: How Dyanmically Change Host Name in main.hco

    ‏2012-10-10T10:05:23Z  
    Hi Tim,

    I am still not able to implement the solution successfully can you please guide me where to write this code as I have Login macro, Login Integration Object and the web service support files.

    Thanks
    Hi,

    Check if the link below helps you

    http://www-01.ibm.com/support/docview.wss?uid=swg21251884
    Best Regards
    Santhi