TIBCO | Point local DEV environment to other environment

While developing or debugging TIBCO BW application there comes a situation where a developer needs to point its local dev project to one of the test environments.  TIBCO Designer provides feature to point to other environments without changing current Global Variables containing Dev properties(Such as JMS details). This important to debug the deployed code with current dev code. In coming post I will we giving steps to take deployed code(Root code) and debug it. 

With TIBCO Designer with can provide configuration file(.cfg file) and change the GVs before running code in test mode.

Step 1 : Give proper global variables names to JMS/HTTP connections.





As we can see GVs are named properly with each JMS property as variable. If we hard-code the connection details then we can't change this at deployment time. It is good practice to create GV for each configurable connection details.


Step 2 : Create configuration file(.cfg)

create a configuration file containing each GV. If you check above GVs JNDI URL as below structure.

ProjectName/JMS/Connections/JNDI/JNDI_Context_URL


Now concatenate above string as below.

tibco.clientVar.ProjectName/JMS/Connections/JNDI/JNDI_Context_URL=<<give here test environment jms connection URL>>

The final string will be as below

tibco.clientVar.ProjectName/JMS/Connections/JNDI/JNDI_Context_URL=tcp://localhost:7221,tcp://localhost:7222
tibco.clientVar.ProjectName/JMS/Connections/JNDI/JNDI_UserName=
tibco.clientVar.ProjectName/JMS/Connections/JNDI/JNDI_Password=
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain1/JMS_UserName=
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain1/JMS_Password=
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain1/JMS_QueueFactory_Name=domain1
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain1/JMS_TopicFactory_Name=
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain2/JMS_UserName=
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain2/JMS_Password=
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain2/JMS_QueueFactory_Name=domain2
tibco.clientVar.ProjectName/JMS/Connections/JMS_Domain2/JMS_TopicFactory_Name=

Save the file as env_name.cfg

Step 3 : Start the Project in test mode and give cfg file as argument. 



Select the process to run then click on Advanced button.



In  Test Engine User args give path of created CFG file as below and click OK.

-p "path_of_cfg_file"

Then run Project as usual. You can check configuration is correct via sending one test message to test env queue and receiving that message in Local TIBCO Designer. 

Comments

Post a Comment

Popular posts from this blog

Spring | Using TIBCO EMS with Spring framework

TIBCO | For Loop - Accumulate output

TIBCO | JNDI Server & JMS Instance creation