With the new OEPE 11.1.1.6 you can create and run all your WLST scripts from Eclipse. This blogpost will give you a WLST jumpstart in the Eclipse IDE. The WLST / Phyton support for the Eclipse IDE is one of the many new OEPE features. For more info read the Markus Eisele great blogpost about all the new and cool features of OEPE.
Let's do some WLST scripting. Before you can start you need to download and install WebLogic. Off course you also need to download OEPE 11.1.1.6
Start Eclipse and provide the workspace folder.
Click on Workbench
You need to create a new Project where WebLogic can be targeted. Choose for example Dynamic Web Project. ( You don't need to create a Web Application for WLST scripting )
Provide the name of the Project and click on New Runtime.
Open the Bea or Oracle Node and select a WebLogic release. The latest WLS release is 11gR1 PatchSet 2
Browse to the WebLogic Home this is the wlserver_10.3 folder in the FMW Home.
Click on Finish.
Select your just created web project and open the project options. Go to the Project Facets and enable the Oracle WebLogic Scripting Tools support.
This enables the WLST scripting for this project.
Select the wlst folder and create a new WLST Script.
Choose for a default template or make a empty wlst file. In this case we will use "Create Basic WebLogic Domain"
This will always create a file called newWlst.py in the wlst folder.
Change the domain folder in /user_project/domains/...
Rename this wlst file else it will be overwritten by a other WLST script creation.
Select your Domain script and in Run As, choose for WLST Run.
This will create the WebLogic Domain.
Next step is to start this WebLogic Domain. Select New and go to the Server node and click on Next.
Choose for Oracle WebLogic Server 11gR1 PatchSet 2 in the Oracle node.
Browse to the new WLS Domain folder.
In the server window you can start this WebLogic server.
After the WebLogic is started, you can open the MBean Browser. Go to the Window Menu , Show View and choose Other.
Select WebLogic MBean Explorer in the WebLogic node.
This will give you an overview of all the MBeans. You can drag and drop a MBean to your WLST script.
To this WLS Domain we can add some JMS messaging by creating a new WLST Script.
Select the "Configure JMS System Resource" Template.
Rename this script.
And when you run this script you will see the output in the console window.
That's all for the jumpstart.
Great post, thanks!
ReplyDeleteBTW: This configures a proper Jython interpreter for WLST in your workspace. From now on you can create new PyDev projects choosing that WLST interpreter and develop scripts in a clean PyDev project. You can even delete the original Dynamic Web Project.
Thank you!
ReplyDeleteI got an issue when I tried to run script under Windows, jython failed to interpret 'os' variable, so I provided path variables (BEA_HOME and WL_HOME) directly in py file.
Hello,
ReplyDeleteIs there something similar for JDeveloper ?
Andrei
Hi,
DeleteToo bad , OEPE is more focused on weblogic (wlst and also with deployment plans ) than JDeveloper.
Thanks
Any Comments on https://community.oracle.com/thread/3516796
ReplyDeleteBut this is all focused on local development, on a single version of weblogic. What if you are deploying to managed servers on a remote machine. Can you use any of this tooling to facilitate creating and running wlst scripts on those remote deployments?
ReplyDeleteHi Edwin,
ReplyDeleteI have followed the steps given here. But i am not getting Weblogic MBean Browser in views. Can you suggest.
Thanks,
Pradeep
Got it MBean Browser is integrated in Server window itself in 11.1.1.7.
ReplyDeleteThanks,
Pradeep