Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to execute wsadmin scripts(Websphere application server) from java (Standalone program)?

 
Ouney Gags
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks, Need your help.

We can embed WLST scripts inside a java class and execute through WLSTInterpreter(Python Interpreter with Weblogic extensions). Can we do the same for wsadmin scripts (from standalone java program)?

I understand that we can use jmx but i think that works from a servlet but i need to execute wsadmin script ( create server/profiles etc.) from a standalone java program. Can we directly embed wsadmin (jython) script in java and execute them with PythonInterpreter? Waiting for the responses.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you call wsadmin.sh with the -f parameter, you can pass in a script rather than using interactive mode. This means you can use Runtime.exec() from Java to run the command.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!