Friday, August 13, 2010

Modifying DataSource connection pool properties/advanced/custom using jython

1.       Prepare a script with required parameters as below and save in a file (ex:modifyds)

AdminConfig.modify('(cells/<hostname>Node01Cell/nodes/<hostname>Node01/servers/server1|resources.xml#ConnectionPool_1281713531147)', '[[connectionTimeout "888"] [maxConnections "888"] [unusedTimeout "888"] [minConnections "18"] [purgePolicy "EntirePool"] [agedTimeout "8888"] [reapTime "8888"][freePoolDistributionTableSize "8"] [stuckTime "8"] [stuckTimerTime "8"] [surgeCreationInterval "8"] [numberOfSharedPoolPartitions "8"] [stuckThreshold "8"] [numberOfFreePoolPartitions "8"] [surgeThreshold "-1"]]')

AdminConfig.create('Property', '(cells/<hostname>Node01Cell/nodes/<hostname>Node01/servers/server1|resources.xml#ConnectionPool_1281713531147)', '[[validationExpression ""] [name "test"] [description "test"] [value "test"] [required "false"]]')

AdminConfig.save()

2.       Copy the file to the server to some folder (ex: /var/scripts)

3.       Run the following command

./wsadmin.sh -lang jython -f /var/scripts/modifyds

4.       Connects to the server/dmgr and should come out without any error (in case of error, troubleshoot based on the message); verify the datasouce properties in admin console



This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.

Posted via email from shaker's posterous

0 comments: