Posts

Showing posts from April, 2016

How to run WLST from java.

This could help to create roles,users,grant permissions  on Weblogic server Running WLST From a Java Class package wlst; import java.util.*; import weblogic.management.scripting.utils.WLSTInterpreter; import org.python.util.InteractiveInterpreter; /**  * Simple embedded WLST example that will connect WLST to a running server,  * create two servers, and assign them to a newly created cluster and exit.  * <p>Title: EmbeddedWLST.java</p>  * <p>Copyright: Copyright (c) 2004</p>  * <p>Company: BEA Systems</p>  */ public class EmbeddedWLST {   static InteractiveInterpreter interpreter = null;   EmbeddedWLST() {     interpreter = new WLSTInterpreter();   } private static void connect() {     StringBuffer buffer = new StringBuffer();     buffer.append("connect('weblogic','weblogic')");     interpreter.exec(buffer.toString());   } private static void createServers() {     StringBuffer buf = new StringBuffer();