On steps to executing the script, please click here. import os connect(userName,passWord,'t3://'+wlsHost+':'+adminServerListenPort) edit() startEdit() soaJDBCSystemResource1 = create('DBAdapterTestDataSource',"JDBCSystemResource") soaJDBCResource1 = soaJDBCSystemResource1.getJDBCResource() soaJDBCResource1.setName('DBAdapterDataSource') soaConnectionPoolParams1 = soaJDBCResource1.getJDBCConnectionPoolParams() soaConnectionPoolParams1.setTestTableName("SQL SELECT 1 FROM DUAL") soaConnectionPoolParams1.setInitialCapacity(10) soaConnectionPoolParams1.setMaxCapacity(100) soaDataSourceParams1 = soaJDBCResource1.getJDBCDataSourceParams() soaDataSourceParams1.addJNDIName('jdbc/dbSample') soaDriverParams1 = soaJDBCResource1.getJDBCDriverParams() soaDriverParams1.setUrl('jdbc:oracle:thin:@'+db_host_name+':'+db_port+':'+db_sid) soaDriverParams1.setDriverName('oracle.jdbc.xa.client.OracleXADataSource') soaDriverParams1.setPassword('my_password') soaDriverProperties1 = soaDriverParams1.getProperties() soaProperty1 = soaDriverProperties1.createProperty("user") soaProperty1.setValue('scott') varSOAServerTarget = '/Servers/'+serverName soaServerTarget = getMBean(varSOAServerTarget) soaJDBCSystemResource1.addTarget(soaServerTarget) dumpStack() try : save() activate(block="true") except: print "Error while trying to save and/or activate!!!" dumpStack() print "Creating DB adapter resource information" try: redeploy('DBAdapter', '@deployment.plan@', upload='true', stageMode='stage') except: print "Error while modifying db adapter connection factory" |
Showing posts with label WebLogic Scripting Tool. Show all posts
Showing posts with label WebLogic Scripting Tool. Show all posts
Saturday, June 23, 2012
Weblogic Fusion Middleware 10.3.5 WLST Script for Creation of the Database Resource and Redeployment of the Database Adapter
########
Labels: Oracle Service Bus, OSB, WebLogic Scripting Tool, WLST
WLST Script for Creation of JMS Resource and Redeployment of JMS Adapter
This script can be used for creation of JMS Resource and Redeployment of JMS Adapter On steps to executing the script, please click here. # lookup the JMSModule jmsSOASystemResource = lookup("SOAJMSModule","JMSSystemResource") jmsResource = jmsSOASystemResource.getJMSResource() cfbean = jmsResource.lookupConnectionFactory('DemoSupplierTopicCF') if cfbean is None: print "Creating DemoSupplierTopicCF connection factory" demoConnectionFactory = jmsResource.createConnectionFactory('DemoSupplierTopicCF') demoConnectionFactory.setJNDIName('jms/DemoSupplierTopicCF') demoConnectionFactory.setSubDeploymentName('SOASubDeployment') topicbean = jmsResource.lookupTopic('DemoSupplierTopic') if topicbean is None: print "Creating DemoSupplierTopic jms topic" demoJMSTopic = jmsResource.createTopic("DemoSupplierTopic") demoJMSTopic.setJNDIName('jms/DemoSupplierTopic') demoJMSTopic.setSubDeploymentName('SOASubDeployment') try: save() # activate the changes activate(block="true") print "jms topic and factory for SOA Fusion Order Demo successfully created" except: print "Error while trying to save and/or activate!!!" dumpStack() print "Creating jms adapter connection factory information" try: redeploy('JmsAdapter', '@deployment.plan@', upload='true', stageMode='stage') except: print "Error while modifying jms adapter connection factory" |
########
Labels: Oracle Service Bus, OSB, WebLogic Scripting Tool, WLST
Weblogic 10.3.5: Enable Debugging Using the WebLogic Scripting Tool WLST Scripts and WLST from Java
########
Labels: AIA, WebLogic Scripting Tool, WLST
Subscribe to:
Posts (Atom)