Did you know that you can have a profile setup for all your WLST sessions? What I mean by that is, you can have a profile script that gets executed whenever you invoke WLST. I usually have my few WLST extensions (some custom commands that are not part of WLST) and a connect command in this profile script such that I dont have to execute each of these extensions and type in my connect command for every WLST invocation.
···To have a profile, all you will need to do is create a file with name ‘wlstProfile.py’ and place it in your ‘user.home’ directory. You can also have the wlstProfile.py in your current directory from where you invoked WLST. An example wlstProfile.py is shown below.
# wlstProfile that gets executed for every WLST invocation
print ‘Setting up WLST JDBC extensions’
execfile(‘c:/wls/satya/scripts/jdbc/jdbcExtensions.py’)
print ‘Setting up WLST WLDF extensions’
execfile(‘c:/wls/satya/scripts/wldf/wldfExtensions.py’)
print ‘Now connecting… ‘
connect(‘weblogic’,'weblogic’,'t3://sghattu:7001′)
If you are not sure what your ‘user.home’ directory is, you can find out by doing this.
wls:/(offline)> java.lang.System.getProperty(“user.home”)
‘C:\\Documents and Settings\\SGhattu’
wls:/(offline)>
_uacct = “UA-2684269-2″;
urchinTracker();