Thursday, March 19, 2015

WLST difference between offline and online

I have a WLST script written for ONLINE use, and I want to convert it into an OFFLINE script... It's mostly a philosophical issue, I believe it's awkward to CONFIGURE a domain while the domain's ADMIN is running, it's a stupid requirement to have to start the ADMIN.

Google finds these 2 links but they don't tell you much.
https://docs.oracle.com/cd/E24329_01/web.1211/e24491/wlst_faq.htm#WLSTG243
http://wlstbyexamples.blogspot.ch/2010/01/wlst-offline-vs-wlst-online.html#.VQmoh0YzDOo

FIRST thing: you don't "connect" to a URL (t3..), but you readDomain("/path/to/mydomain'), and you don't "edit/startEdit" any longer.

You create(msname, 'Server') to create a server.... don't use cmo.createServer() !

You can cd('/Servers' + msname) and you will see it WITHOUT subdirectories (like ServerStart, SSL....)... this is NORMAL, as wlsf-offline reflects the structure of the config.xml that would be written, and the config.xml is a LAZY document, which doesn't specify the defaults.... so if a SSL option has not been yet customized, the whole folder will not appear.

So you will need to do "create(msname, 'SSL')" and "create(msname, 'ServerStart')" before you can cd('/Servers/' + msname + '/ServerStart') and do some set(property, value) commands...

The typical "create you will run are:

create(name, 'Server')
create(name, 'ServerStart')
create(name, 'SSL')
create( name, 'Log')
create( name, 'WebServer')
create(name, 'DefaultFileStore')
create(name, 'DataSource')

At the end, you "updateDomain()" to persist your changes.



No comments: