Thursday, November 20, 2014

wsadmin check global security


 the below  function  if security is enabled will return True else False.


def isGlobalSecurityEnabled():
    securityon = AdminTask.isGlobalSecurityEnabled()
    return securityon

Another Usage:


security=AdminTask.isGlobalSecurityEnabled()
if security == 'true':
 print "Global security Enabled"
else:
 print "Global Security not Enabled"

wsadmin check application exist or not

appname="Yourappname"
isapppresent=AdminConfig.getid("Deployment:"+appname+"/")
if len(isapppresent) > 0:
   print "the application %s is present" % appname
else:
  print "the application  %s is not present"  % appname
 

wsadmin get hostname of a node

node=AdminControl.getNode()
ns=AdminConfig.getid("/Node:"+node+"/")
AdminConfig.showAttribute(ns,'hostName')

Tuesday, October 14, 2014

Configure websphere datasource for cluster database configuration

Oracle RAC cluster:

  jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-node1)(port=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=rac-node2)(port=1521)))(FAILOVER=on)(LOAD_BALANCE=on)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<service_name>)))


DB2 HADR:
   The below values are needed  for configuration

Retry interval for client reroute
Maximum retries for client reroute
Alternate server names
Alternate port numbers
Client reroute server list JNDI™ name
Unbind client reroute list from JNDI

Monday, October 13, 2014

Generate javacore automatically ,threaddumps during hung threads

Add the below custom property to genereate thread dump:

com.ibm.websphere.threadmonitor.dump.java  true

Application servers->server->Server Infrastructure->Administration->Custom property