WAS
asked on
jython script for creating shared libraries in WAS7.0.0.21
Please provide jython script for creating shared libraries and classloader in WAS7.0.0.21
Below are the steps i do in WAS7 admin console manually, i like to automate them
1) Environment -> shared library --> scope at server level (jvm level) and name is "govisl" and the classpath is /usr/local/govi/aaa.jar and /usr/local/govi/bbb.jar
2) Application Servers --> <servername> --> java and Process Management --> Classloader --> create a new classloader with application classloader first --> assign the shared library "govisl"created in step1 to this classloader
3) save the config
Please provide the jython script as soon as possible.
Please let me know if you have any questions
Below are the steps i do in WAS7 admin console manually, i like to automate them
1) Environment -> shared library --> scope at server level (jvm level) and name is "govisl" and the classpath is /usr/local/govi/aaa.jar and /usr/local/govi/bbb.jar
2) Application Servers --> <servername> --> java and Process Management --> Classloader --> create a new classloader with application classloader first --> assign the shared library "govisl"created in step1 to this classloader
3) save the config
Please provide the jython script as soon as possible.
Please let me know if you have any questions
ASKER
hard coded
ASKER
HonorGod,
Any updates please :)
Any updates please :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So, the name of the server to which you want the shared library added is named "govisl", correct?
yes
Is this server name unique, or do you want / need to specify a node as well?
server name is unique , no need for node name
I don't remember if the delimiter for classpath items is a colon, or semi-colon, do you?
yes it's colon
i did ran your script, i see it's only showing the info and not performing the change.
Also please update the script where it should be able to create shared lib and classloader to jvm's for two appserver's in other words JVM's and thier names are govisl and govisl2.
Also Can you able write scripts in below format, like defining the seperate funcation for each task like below, because i was planning to add the script you provide to my existing jython script
def add_bobwm():
cell_name = "kkk"
cluster_name = "pppp"
cell = '/Cell:' + cell_name
ServerCluster = cell + '/ServerCluster:' + cluster_name
wm_provider=AdminConfig.ge tid(Server Cluster + '/WorkManagerProvider:Work ManagerPro vider')
AdminConfig.create('WorkMa nagerInfo' , wm_provider, [['name', 'papaWorkManager'], ['jndiName', 'tim/papaWorkManger'], ['numAlarmThreads', '2'], ['minThreads', '7'], ['maxThreads', '60'], ['threadPriority', '5'], ['isGrowable', 'off']])
AdminConfig.save()
add_bobwm();
yes
Is this server name unique, or do you want / need to specify a node as well?
server name is unique , no need for node name
I don't remember if the delimiter for classpath items is a colon, or semi-colon, do you?
yes it's colon
i did ran your script, i see it's only showing the info and not performing the change.
Also please update the script where it should be able to create shared lib and classloader to jvm's for two appserver's in other words JVM's and thier names are govisl and govisl2.
Also Can you able write scripts in below format, like defining the seperate funcation for each task like below, because i was planning to add the script you provide to my existing jython script
def add_bobwm():
cell_name = "kkk"
cluster_name = "pppp"
cell = '/Cell:' + cell_name
ServerCluster = cell + '/ServerCluster:' + cluster_name
wm_provider=AdminConfig.ge
AdminConfig.create('WorkMa
AdminConfig.save()
add_bobwm();
ASKER
Hi HonorGod,
Any updates please :), if you are busy with your work mine can hold
Any updates please :), if you are busy with your work mine can hold
ASKER
HonorGod,
Any updates :)
Any updates :)
ASKER
Any updates ?
ASKER
didn't completed.
Do you want the script to have values hard coded, or use command line parameters?