It's all about the answers!

Ask a question

Issue setting paths, environment variables in the JBE

Eugene Grant (82) | asked Jul 04 '19, 10:32 a.m.

We have a windows bat file to start our JBE.

It basically contains the following 2 lines and runs successfully: 

call "<mqsipath>\bin\mqsiprofile.cmd"
jbe -repository -userid <userName> -passwordFile <file> -engineId <name>

The mqsiprofile.cmd comes from the IBM Integration Bus(IIB) product and is used to set paths and environment variables before the ANT tasks in the build engine call various IIB mqsi commands.

This windows bat file was converted to a Windows Service using the JavaService utility. 
This service basically calls the jbe application.
The call to the mqsiprofile therefore had to be incorporated into the ANT build scripts in the JBE.
Doing this in an ANT task does not work as in this example:

The paths, environment variables are set up in the first exec but the second exec fails because it cannot see them!
<exec executable="${mqsi_path}/bin/mqsiprofile.cmd" failonerror="false"/>
<exec executable="mqsipackagebar.bat" spawn="false" vmlauncher="false" failonerror="true">
  <arg value="-w" />...

However this example does work:
<exec executable="${mqsi_path}/bin/mqsiprofile.cmd" spawn="false" vmlauncher="false" failonerror="true">
  <arg value="&amp;" />
  <arg value="mqsipackagebar.bat" />
  <arg value="-w" />...

This however means that every time an mqsi needs to be run, the mqsiprofile also has to be run. 
This seems very inefficient.
The question is - is there any way to set up the paths, environment variables, etc once(using a cmd file) so that they are available to
all targets and ant tasks running in the JBE?   

Be the first one to answer this question!

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.