Search This Blog

Saturday, October 29, 2011

Applying JRF and Removing Adapters from Admin Server (OSB and SOA)

We had a domain containing WLSCluster, OSBCluster and SOACluster and when we used the default wizard to create a domain some of the adapters were targeted to AdminServer so we had manually remove it as they were not required to be present on admin server.

Also, JRF was not applied to WLSCuster so used the below offline script to aapply it for WLSCluster.

import sys


print "@@@ Starting the script ..."

from java.util import *
from javax.management import *
from java.io import FileInputStream

#The directory of the domain configuration
#/app/oracle/products/11g/admin/domains
wlsDomain=os.environ["WLSDOMAIN"]
print "WLSDOMAIN="+wlsDomain

DOMAIN_PATH= wlsDomain + '/SOACoreDomain/aserver/SOACoreDomain'
print 'reading domain from '+DOMAIN_PATH


readDomain(DOMAIN_PATH)

cd('/')
assign('AppDeployment', 'Message Reporting Purger', 'Target', 'OSB1')
unassign('AppDeployment', 'FileAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'DbAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'JmsAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'AqAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'FtpAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'SocketAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'MQSeriesAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'OracleAppsAdapter', 'Target', 'AdminServer')
unassign('AppDeployment', 'OracleBamAdapter', 'Target', 'AdminServer')

unassign('AppDeployment', 'JMS Reporting Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'Ftp Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'SFTP Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'Email Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'File Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'MQ Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'EJB Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'Tuxedo Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'ALDSP Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'SB Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'WS Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'WS Transport Async Applcation', 'Target', 'AdminServer')
unassign('AppDeployment', 'FLOW Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'BPEL 10g Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'JCA Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'JEJB Transport Provider', 'Target', 'AdminServer')
unassign('AppDeployment', 'SOA-DIRECT Transport Provider', 'Target', 'AdminServer')

applyJRF('WLSCoreCluster', wlsDomain + '/SOACoreDomain/aserver/SOACoreDomain')
print 'Successfully updated domain.'
updateDomain()
closeDomain()

exit()

No comments:

Post a Comment