Saturday, 10 September 2016

B2B Utility to Add / Modify / Delete B2B properties.

I think this is the simplest way to automate to add b2b properties.

Follow the steps provided below to add B2B properties .

Step 1)  Create a property file  ( b2b.properties )with list of B2B properties you want add.  i have created a file with below b2b properties , separated  b2b property name , Value and description with  delimiter ":"

b2b.enableMetrics:true:b2b.enableMetrics
b2b.payloadObfuscation:false:b2b.payloadObfuscation
b2b.inboundThreadCount:15:b2b.inboundThreadCount
b2b.outboundThreadCount:15:b2b.outboundThreadCount
b2b.defaultThreadCount:5:b2b.defaultThreadCount
b2b.MLLP_HA_Mode:true:b2b.MLLP_HA_Mode
b2b.HAInstance:true:b2b.HAInstance
b2b.HAMaxElapsedTimeout:2:b2b.HAMaxElapsedTimeout
b2b.HAHeartBeatPing:1:b2b.HAHeartBeatPing
b2b.MaxTimeInAcquiredState:3:b2b.MaxTimeInAcquiredState
b2b.AcquiredStatePollingInterval:2:b2b.AcquiredStatePollingInterval
b2b.SingleTransactionAtInbound:true:b2b.SingleTransactionAtInbound
b2b.inboundThreadSleepTime:100:b2b.inboundThreadSleepTime
b2b.outboundThreadSleepTime:100:b2b.outboundThreadSleepTime
b2b.transportDispatcherThreadCount:10:b2b.transportDispatcherThreadCount
b2b.optimizeStorage:true:b2b.optimizeStorage
b2b.TPACache:local:b2b.TPACache
b2b.mdsCache:400000:b2b.mdsCache
b2b.mdsCache.minutesToLive:0:b2b.mdsCache.minutesToLive
b2b.encoding:ISO-8859-1:b2b.encoding
b2b.binaryEncodingList:ISO-8859-1:b2b.binaryEncodingList
b2b.discardACKList:AE,AR:NAKList


step 2) create a file : mbeanutil.properties with below details.

host=<AdminHostName>
port=12001
user=weblogic
password=Welcome1

step 3) Create a shell script ( SetB2Bproperties.sh ) , Modify the JAVA_HOME and MiddleWare Home according to your environment. 



#!/bin/bash

ORACLE_BASE=/u01/oracle
ORACLE_BASE=/u02/private/oracle
MW_HOME=$ORACLE_BASE/products/fmw

export JAVA_HOME=/u02/private/oracle/products/jdk1.7.0_80
export PATH=${JAVA_HOME}/bin:${PATH}
echo $MW_HOME
echo $JAVA_HOME
echo $PATH

FILENAME=$1
count=0

cat $FILENAME | while read LINE
do
let count++
echo "$count $LINE"
Name=`echo $LINE | cut -d':' -f1`
Value=`echo $LINE | cut -d':' -f2`
Comment=`echo $LINE | cut -d':' -f3`

java -cp $MW_HOME/soa/soa/modules/oracle.soa.b2b_11.1.1/b2b.jar:$MW_HOME/wlserver_10.3/server/lib/wljmxclient.jar:$MW_HOME/modules/glassfish.jaxb_1.1.0.0_2-1-14.jar oracle.tip.b2b.utility.ConfigMBeanUtility add $Name $Value $Comment

done
echo -e "\nTotal $count Lines read"

echo " Added properties are below : Please cross verify the peroperties with PRDF :"

java -cp $MW_HOME/soa/soa/modules/oracle.soa.b2b_11.1.1/b2b.jar:$MW_HOME/wlserver_10.3/server/lib/wljmxclient.jar:$MW_HOME/modules/glassfish.jaxb_1.1.0.0_2-1-14.jar oracle.tip.b2b.utility.ConfigMBeanUtility  mbeanutil.properties

 
4) Execute the shell script to add b2b properties. Provide the argument that is property file name created in step 1.

command : 

sh SetB2Bproperties.sh b2b.properties


3 comments:

  1. Will this need a rolling restart or a restart in general in order for the b2b property changes to take effect?

    ReplyDelete
    Replies
    1. Sorry for late response. Yes, it is required a rolling restart.

      Delete