I need to create a JNDI provider resource in the servicebus console using WLST as part of my Chef Automation. I knew the process of manual creation but didn't have the WLST script. I didn't find the necessary information on any blogs or official documents as well. Can anyone please help me with this?
Create a JNDI Provider Resource in servicebus console using WLST
354 views Asked by Srikanth Reddy K At
2
There are 2 answers
0
On
Maybe this can be a solution for you. Here is example for 11g. 12c is very similar (sorry, I noticed it is about 12c after I wrote whole instruction) and whole idea is the same.
Menu visible after login, with all menu item mentioned below - 11g:

I. Create new resource
- Login to OSB Console, by default http://localhost:7001/sbconsole
- On the left side click on System Administration item
- Then find JNDI Providers, under Global Resources
- Start new OSB Console session, click Create at the top left corner
- Click Add
- Provide all the required details
- Click Save
- Activate session - click on green Activate button, in the left top corner
II. Export created resource
- In the left find and click on System Administration
- Find and click Export Resources
- At the top click on Export Resources
- Click on + button next to first listed item called System
- Tick the checkboxes next to JNDI Providers which are part of your interest
- At the bottom click Export
- Select if you want to protect Sensitive Data (and provide pass-phrase) or not
- Click Finish Export
Now you have a JAR file which you can play with - extract files, update content of XML files which contain your JNDI Provider definition, add the new ones, re-pack and re-deploy using WLST.
Below is description how to deploy OSB JAR using WLST. There is a chance it requires small changes to handle JNDI Providers deployment. https://redstack.wordpress.com/2011/08/25/getting-started-with-continuous-integration-for-osb/

You can start reading these documentations : Oracle WebLogic Server 12c: Using the WebLogic Scripting Tool, WebLogic Scripting Tool and WLST Command Reference
Please note that the WLS admin console has a record mode. When you create or update your configuration, the console records all your actions in a wlst file. Very usefull to learn WLST.