1. I need to update the JVM classpath
2. I need to change the values of the classloader and WAR classloader
policy for my application.
3. I need to regen the server
All three must be done via scripts (or somehow automatically).
Thanks for any and all help you can give me!
--
gchen74
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message191326.html
Michael Gruner
Thanks for your help though,
Grace
Michael Gruner wrote:
> *On Thu, 22 Apr 2004 15:44:10 -0500, gchen74 wrote:
> > I am trying to do a few things and need to know if it's possible
> via
> > wsadmin, and if not, what is the best way to go about it.
> You may do all things you can do via web-based admin-console with
> wsadmin
> as well. Recently I automated all changes I need to do on our WAS5
> installation using wsadmin beginning with JDBC-provider,
> datasources,
> creation of a new server (and setting classpath for that server) and
> installation of an new application. You may find some additional
> information at
> You may search the WAS Information-Center for wsadmin and maybe
> classpath...
> I also got some examples to download from IBM-Sites but cant
> remember URI :-(
> >
> > 1. I need to update the JVM classpath 2. I need to change the
> values
> > of the classloader and WAR classloader policy for my application.
> 3. I
> > need to regen the server
> I think all the tasks above may be done by wsadmin...
>
> Michael Gruner *
On Fri, 23 Apr 2004 14:45:46 -0500, gchen74 wrote:
>
> Thanks for the reply Mike. I've actually found the solution to updating
> JVM Classpaths via wsadmin but am still looking for a way to set the
> classloader and WAR classloader policies. I've looked through all of
> the documentation that IBM offers but have yet to find anything that
> addresses how to do that.
You may take a deeper look into the wsadmin-tool. I think it gives you
all you need ;-). Unfortunately I currently don't know where to set the
classloader or WAR classloader at all.
I think the wsadmin tool offers a really good help system. You may want to
launch wsadmin and try to identify the objects you are going to configure
by launching $AdminConfig types. By launching $AdminConfig attributes
<type> you can see all possible properties you can change. To get more
help on $AdminConfig type $AdminConfig help or $AdminConfig help <command>.
To identify the types and attributes I need, I did the following: I did
the configuration my script would do later via web based admin console.
After that I launched wsadmin and got a ConfigID via $AdminConfig getid
... Then I did a $AdminConfig show <ConfigID> and $AdminConfig showall
<ConfigID>.
After some trial and error you should get your scripts running ;-)
Sorry for the broken English
Michael Gruner
Great, thank's a lot !!!
For those who might be interested - here's my version of the script
that installs the application, changes it's "WAR Classloader Policy"
to "Application" (SINGLE) and starts it:
set appman [$AdminControl queryNames
cell=wasdev,node=wasdev,type=ApplicationManager,process=server1,*]
$AdminApp install /home/evgenyg/pmp/pmp.ear {-appname pmp
-usedefaultbindings -BindJndiForEJBNonMessageBinding
{{"framework-ejb.jar" MicroflowServiceEjb
framework-ejb.jar,META-INF/ejb-jar.xml MicroflowServiceEjb}
{"framework-ejb.jar" SecurityServiceEjb
framework-ejb.jar,META-INF/ejb-jar.xml SecurityServiceEjb}}}
$AdminConfig save
set app [$AdminConfig getid "/Deployment:pmp/"]
set deploy [$AdminConfig showAttribute $app "deployedObject"]
$AdminConfig modify $deploy {{warClassLoaderPolicy SINGLE}}
$AdminConfig save
$AdminControl invoke $appman startApplication {"pmp"}
> Great, thank's a lot !!!
>
> For those who might be interested - here's my version of the script
> that installs the application, changes it's "WAR Classloader Policy"
> to "Application" (SINGLE) and starts it:
>
> set appman [$AdminControl queryNames
> cell=wasdev,node=wasdev,type=ApplicationManager,process=server1,*]
> $AdminApp install /home/evgenyg/pmp/pmp.ear {-appname pmp
> -usedefaultbindings -BindJndiForEJBNonMessageBinding
> {{"framework-ejb.jar" MicroflowServiceEjb
> framework-ejb.jar,META-INF/ejb-jar.xml MicroflowServiceEjb}
> {"framework-ejb.jar" SecurityServiceEjb
> framework-ejb.jar,META-INF/ejb-jar.xml SecurityServiceEjb}}}
> $AdminConfig save
> set app [$AdminConfig getid "/Deployment:pmp/"]
> set deploy [$AdminConfig showAttribute $app "deployedObject"]
> $AdminConfig modify $deploy {{warClassLoaderPolicy SINGLE}}
> $AdminConfig save
> $AdminControl invoke $appman startApplication {"pmp"}
Just a hint for those who may install some more apps using that script:
You may want to replace for example cell-name, node-name and so on by
variables. So you are able to use the script everywhere just by calling
your script with the values you like to have as arguments e.g. "wsadmin -f
myscript.jacl cell-name node-name". Within the script you may access the
arguments via argv[0]...argv[n]
Michael Gruner
-Grace
Michael Gruner wrote:
> *Hi Grace,
I have the same problem, but when I use the necessary part of this Script I
get the following error:
wsadmin>set deploy [$AdminConfig showAttribute $app "deployedObject"]
WASX7015E: Exception running command: "set deploy [$AdminConfig
showAttribute $app "deployedObject"]"; exception information:
com.ibm.websphere.management.exception.ConfigServiceException
javax.management.RuntimeMBeanException
java.lang.NullPointerException: java.lang.NullPointerException
Any ideas ?
Thanks,
Markus
"gchen74" <gchen74...@mail.webservertalk.com> schrieb im Newsbeitrag
news:gchen74...@mail.webservertalk.com...
Your $app variable could be not defined (hence, NPE). I define it as follows
set app [$AdminConfig getid "/Deployment:pmp/"]
while 'pmp' is my application's name - but not yours, as I can think of :)
WASX7017E: Exception received while running file "update_app.tcl";
exception information:
com.ibm.websphere.management.exception.ConfigServiceException
javax.management.RuntimeMBeanException
java.lang.NullPointerException: java.lang.NullPointerException
Springwater wrote:
> *Hy !
> > *
--
Spab