What is the WebLogic Scripting Tool?

What is the WebLogic Scripting Tool?

Bea WebLogic Scripting Tool WLST is a command-line scripting interface . The WLST scripting environment is based on the Java scripting interpreter, Jython language.
We can use WLST for administrative processes. WLST is alternative for admin console.

Weblogic Scripting WLST examples.
create server example

[oracle@wls-sysadm /]$ java weblogic.WLST (for start weblogic)

wls:/offline> connect(‘weblogic’,’Welcome1′,’t3://localhost:7001′) Successfully connected to Admin Server ‘AdmSvr’ that belongs to domain ‘BilDomain’.

wls:/BilDomain/serverConfig> cd(‘Servers’)

wls:/BilDomain/serverConfig/Servers> edit()

wls:/BilDomain/edit> startEdit()

wls:/BilDomain/edit !> server1=create(‘Svr2′,’Server’)
(MBean type Server with name Svr3 has been created successfully.)

wls:/BilDomain/edit !> server1.getName()

‘Svr2’

wls:/BilDomain/edit !> ls(‘Servers’)

drw- AdmSvr
drw- Svr1
drw- Svr2

was:/BilDomain/edit !> save()

was:/BilDomain/edit !> activate()

wls:/BilDomain/edit !> stopEdit()

wls:/BilDomain/edit> exit()

[oracle@wls-sysadm /]$

Deploy example
connect(‘weblogic’,’welcome1′,’t3://localhost:7001′)

deploy(appname, applocation, targets=’srv1′,
planPath=’c:/weblogic/plan/plan.xml’)

connect(‘weblogic’,’welcome1′,’t3://adminserver:7001′)
name = “Muhasebe”

location = “/home/oracle/applications/muhaebe.ear”

deploy(name, location, targets=’svr1′)

monitor
serverRuntime()
JVM =getMbean(‘/JVMRuntime/svr1’)
print ‘free percent memory heap’ + jvm.getFreeHeapPercent()
print ‘Garbage collection time’+jvm.getTotalGarbageCollectionTime(

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s