• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

WLST: How to set the path to my deployment?

Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm using WebLogic 9.2.2. I'm trying to write a script to automatically set up my server and its cluster. But I can't figure out how to set the path to the source of the deployable unit -- e.g. where my WAR file will go.

Below is the script I'm currently using, if that gives any insight into how I'm thinking. Thanks, - Dave

===========================Begin script====================================
from java.util import *
from javax.management import *
import javax.management.Attribute

print 'starting the script .... '

cluster_name = 'Dave_Cluster'
ms1 = {'managed1': (7019,8020),'managed2': (7020,8021)}
machine = 'my-machine-machine'
log_file = 'logs/npsconfiggui-ms-1.log'
classpath = '/export/third-party/etsbea/application_conf/wls_9.2.2/nps_config_gui_conf:/export/third-party/etsbea/product/wls_9.2.2/weblogic92/server/lib/weblogic.jar:/export/third-party/etsbea/product/wls_9.2.2/weblogic92/platform/lib/p13n/p13n-schemas.jar:/export/third-party/etsbea/product/wls_9.2.2/weblogic92/platform/lib/p13n/p13n_common.jar:/export/third-party/etsbea/product/wls_9.2.2/weblogic92/platform/lib/p13n/p13n_user.jar:/export/third-party/etsbea/product/wls_9.2.2/weblogic92/platform/lib/wlp/net uix_common.jar:/export/third-party/etsbea/product/wls_9.2.2/weblogic92/platform/lib/wlp/netuix_schemas.jar:/export/third-party/etsbea/product/wls_9.2.2/weblogic92/platform/lib/wlp/netuix_user.jar:.:/export/third-party/etsbea/product/wls_9.2.2/jdk1.5.0_12/lib/tools.jar'
arguments = '-Xms256m -Xmx256m -XX:NewSize=64m -XX:MaxNewSize=64m -XX:SurvivorRatio=4 -Dweblogic.wsee.useRequestHost=true'


print 'creating cluster '+cluster_name
clu = create(cluster_name,'Cluster')
cd('Clusters/' + cluster_name)
set('MulticastAddress', '')
set('ClusterAddress', '')
set('MulticastPort', 9020)
set('DefaultLoadAlgorithm', 'round-robin-affinity')
set('WeblogicPluginEnabled', 'false')


for m, (lp, ssl_lp) in ms1.items():
cd ('/')

managedServer = create(m,'Server')
print 'creating managed server '+m
# Set SSL port
cd('Servers/' + m + '/SSL/' + m)
set ('Enabled', 'true')
set ('ListenPort', ssl_lp)

# create ServerStart
cd ('../../ServerStart/' + m)
set ('ClassPath', classpath)
set ('Arguments', arguments)

cd ('../../Log/' + m)
set ('FileName', log_file)

# assign server to machine
assign('Server', m, 'Machine', machine)

# assign server to cluster
============================End script====================================
Danger, 10,000 volts, very electic .... tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic