CLA2

Command Line 2 Adapter
Mirjana's picture

CLA2 with params

CLA2 - 3 parameters and Output file usage
 
  • Command line Adapter – configuration:
 
<process name="default">
          <sequence>
                   <operation name="Command Line 2 Adapter">
                             <participant name="CommandLineAdapter2"/>
                             <output message="CmdLine2InputMessage">
                                      <assign to="." from="*"/>
                                      <assign to="cmdLine">/home/si/bin/TEST_cmdWithParams.sh $0 $1 $2 $Output</assign>
                                      <assign to="parm0">abc</assign>
                                      <assign to="parm1">def</assign>
                                      <assign to="parm2">ghi</assign>
                                      <assign to="useOutput">true</assign>
                                      <assign to="workingDir">/home/si/bin</assign>
                             </output>
                             <input message="inmsg">
                                      <assign to="." from="*"/>
                             </input>
                   </operation>
          </sequence>
</process>
 
  • Unix script:
 
#! /bin/ksh
 
echo $1 > $4
echo $2 >> $4
echo $3 >> $4
 
  • Output/PrimaryDocument result:
 
abc
def
ghi
 
Mirjana's picture

Install CLA2 as Windows Service

CLA2 Installation on a remote server – as a windows service

Copy the following files on a remote server:

-          copy the file JavaService.exe (you can find it in folder /SI_install_dir/install/client/msmq/installJavaService)

-          copy the file CLA2Client.jar (you can find it in folder /SI_install_dir/install/client/cmdline2

-          write the script InstallCLA2.cmd so it fits your installation :

_______________________________________________________________

 

REM *** INSTALLS A CLA2 Client as Windows Service ***

 

REM *** CHANGE TO MATCH YOUR INSTALL ***

 

set ListenPort=13052

set ClientJar=C:\CLA2\CLA2Client.jar

set JVM="C:\Program Files\Java\jre1.5.0\bin\client\jvm.dll"

set StdOut="C:\CLA2\serviceOutput.txt"

set ErrorOut="C:\CLA2\serviceError.txt"

 

REM *** DO NOT HAVE TO CHANGE ***

 

set ServiceName=SI_CLA2Adapter_%ListenPort%

set StartClass=com.sterlingcommerce.woodstock.services.cmdline2.CmdLine2RemoteImpl

 

REM *** CHANGE TO MATCH YOUR INSTALL ***

 

C:\CLA2\JavaService -install "%ServiceName%" %JVM% -Djava.class.path=%ClientJar% -start %StartClass% -params %ListenPort% -out %StdOut% -err %ErrorOut%

_______________________________________________________________

 

 

Java version on a remote system must be the same as one used by IBM Sterling Integrator.

 

-          run the script

-          after installation go to Start → Run → regedit

-          find HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SI_CLA2Adapter_16052* (*the name of the service)

-          choose Parametars → JVM Option Number 0 and write the right path for CLA2Client.jar file.

 

This part is only for CLA2 used in PGP encryption

 

-          Start → Control Panel → Administrative Tools → Services

-          Choose CLA2 service and click on Properties → Log On. Click This account and set the user which generated keys.

 

  *** OR ***

nssm install "Command Line Adapter" "c:\Program Files\Java\jre6\bin\java.exe" "-jar c:\cla2\CLA2Client.jar 12699"

Syndicate content