java - WLST command to update JDBC DataSource URL -
i use weblogic console navigate data sources , update url in data sources. there way can same using wlst command. need update command.
i need update url of data source.
we via wlst script in different fashion:
edit() # set url , remove target can redeploy without # restarting managed server startedit() cd("/jdbcsystemresources/"+dsname) targets = get('targets') # set array ob empty objects datasource's targets set('targets',jarray.array([], objectname)) cd("jdbcresource/"+dsname+"/jdbcdriverparams/"+dsname) set("url", dburl) save() activate() # reset thge original targets datasource refreshed startedit() cd("/jdbcsystemresources/"+dsname) set('targets', targets) save() activate()
the thing found needed here changing url on datasource object not redeploy managed managed servers datasource attached to. if use managed servers, either have set targets empty, save datasource, set original targets, save again. redeploys datasource managed servers.
the other alternative restart managed server.
if admin server hosting server (ie no managed servers) not need worry of messing targets in script above.
Comments
Post a Comment