Link to home
Start Free TrialLog in
Avatar of WAS
WASFlag for United States of America

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
Avatar of HonorGod
HonorGod
Flag of United States of America image

Thanks for providing the WAS version.  That helps

Do you want the script to have values hard coded, or use command line parameters?
Avatar of WAS

ASKER

hard coded
Avatar of WAS

ASKER

HonorGod,

Any updates please :)
ASKER CERTIFIED SOLUTION
Avatar of HonorGod
HonorGod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WAS

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.getid(ServerCluster + '/WorkManagerProvider:WorkManagerProvider')
  AdminConfig.create('WorkManagerInfo', wm_provider, [['name', 'papaWorkManager'], ['jndiName', 'tim/papaWorkManger'], ['numAlarmThreads', '2'], ['minThreads', '7'], ['maxThreads', '60'], ['threadPriority', '5'], ['isGrowable', 'off']])
  AdminConfig.save()

add_bobwm();
Avatar of WAS

ASKER

Hi HonorGod,

Any updates please :), if you are busy with your work mine can hold
Avatar of WAS

ASKER

HonorGod,

Any updates :)
Avatar of WAS

ASKER

Any updates ?
Avatar of WAS

ASKER

didn't completed.