Thursday, 26 January 2017

OSB Configurator for customization of the OSB resources

OSB Configurator for customization of the OSB resources

OSB Configurator is a great tool for customisation of the OSB resources . i will try to explain how to use OSB Configurator with example.


Step 1) Download OSB Configurator code from : https://github.com/tomecode/OSB-Config-WLST-Configurator

Step 2) Unzip the downloaded code , once you unzip it , you will be able to see following directories / files.

com                      
osbCustomizer.py        
pom.xml                
src
httpTransport.properties
osbCustomizer.sh        
README.md

Step 3) Open : osbCustomizer.sh file and set the Weblogic Home , OSB Home , Java Home .. The file looks like below.

#!/bin/bash


WL_HOME="/u01/fmw/product/111/wlserver_10.3"
OSB_HOME="/u01/fmw/product/111/osb_111"
export JAVA_HOME="/u01/fmw/jdk1.7.0_80"

export PATH=${JAVA_HOME}/bin:$PATH
export CLASSPATH=${WL_HOME}/server/lib/weblogic.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/sb-kernel-common.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/sb-kernel-resources.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/sb-kernel-api.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/sb-kernel-impl.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/sb-kernel-wls.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/sb-transports-main.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/sb-transports-http-wls.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/modules/*:$CLASSPATH
export CLASSPATH=${OSB_HOME}/modules/*:$CLASSPATH
export CLASSPATH=${OSB_HOME}/modules/features/*:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/transports/mq*.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/transports/ftp*.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/transports/file*.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/transports/sftp*.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/transports/email*.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib/transports/sb*.jar:$CLASSPATH
export CLASSPATH=${OSB_HOME}/lib*.jar:$CLASSPATH
export CLASSPATH=/sbcm1o/admin/scripts/OSB-Config-WLST-Configurator-master/com/tomecode/utils/Utils.class:$CLASSPATH
export CLASSPATH=./*.jar:$CLASSPATH

echo $CLASSPATH

java weblogic.WLST -i osbCustomizer.py $1

4) prepare a property file with the required changes .  In this example i am trying to change only ReadTimeout and ConnectionTimeout of particular Business Service . Properties file name : httpTransport.properties . file entries are below.

#OSB Configuration for deployment
SB_SERVER={
        "ListenAddress":"",
        "ListenPort":7001,
        "Username":"sgannavaram",
        "Password":"",
}


#Setting for customizer
#The list of settings, which will be customized in SBConfig (jar) before deploying to the OSB
SB_CUSTOMIZATOR={
    #SBConfig file location
        "sbconfig.jar":{
                #Customization type: Business Service with transport type: HTTP
                "HTTP":{
                        #Path to the file (BusinessService), which will be customized in SBConfig
                        "OSB_Services/BusinessServices/OSB_BS.BusinessService":{
                                "ReadTimeout":90,
                                "ConnectionTimeout":90
                        },
                },
                #...
        },
}

Step 5)  Place OSB.jar file to script location and run command : osbCustomizer.sh httpTransport.properties

this configurator modify the required changes and deploy the OSB.jar automatically.

For More information refer : 

https://github.com/tomecode/OSB-Config-WLST-Configurator/wiki/OSB-Config-WLST-Configurator

No comments:

Post a Comment