MyST: How to set MBeans on WLS domain

Tuning your Oracle Fusion Middleware Domain is something every WLS administrator dreads but knows has to be done.
The majority of tuning is done through modifying values of MBeans in the domain, and here we present the slightly underappreciated way to set values of MBeans on your domain through Rubicon Red MyST Studio.

This post is part of a Series in which Robert Jan de Groot and I explore the inner and hidden parts of Rubicon Red MyST Studio which might come in handy at times.

Our case has an Oracle SOA Suite 12.2.1.3 clustered domain, consisting of two Managed Servers and the Admin Server. It already is provisioned with MyST, but the situation in which a provisioning is not done yet is also discussed.

One of the often modified (BPEL) MBeans is SyncMaxWaitTime, which can be found in the EM Console of your 12c domain.

Finding the current value

To find it, navigate to your EM Console, log on, and you’ll be greeted with this page.
Click on the icon in the top left corner.
emconsole

Find SOA -> soa-infra and right-click on this: a menu like the one below will be shown:
clickherefirst

Go to SOA Administration -> BPEL Properties and click on it.
clickheresecond
You’ll land on this page:
clickherethird
Now click on More BPEL Configuration Properties.
clickherefourth

You have arrived! Scroll down to find SyncMaxWaitTime and see it has the (default) value of 45 seconds.
DefaultSyncMaxWaitTime

Setting the value in MyST Studio

To get MyST to set the desired value for you on the MBean, you’ll need to add a parameter to the Product SOA Suite in your Platform Blueprint or Platform Model.
This parameter needs to carefully be constructed by following the rules.

The first part needs to be one of the following (all lowercase):

  • bpel
  • bpmn
  • mediator
  • soa-infra

This needs to be followed with a dash (-), and then the name of the MBean you need to set.
So, in our case we’re trying to set the BPEL MBean called SyncMaxWaitTime, and this parameter should be

bpel-SyncMaxWaitTime

Navigate to your Platform Blueprint (or Platform Model) and find the Product SOA Suite.

Start an Edit-session, and add a new Configuration Parameter.

Add bpel-SyncMaxWaitTime and set the value to 50.

You’ll need to save and/or commit the version of your Platform Blueprint or Platform Model for these changes to be available for your Platform Instances.

Pushing out the change to a provisioned environment

Due to a missing feature in MyST Studio <= 6.4.2, we cannot update our running domain with a simple command. We’ll need to follow these steps:

  1. Update our Platform Instance to new version of Platform Model
  2. Run additional command on Platform Instance
  3. PROFIT!

1. Update the Platform Instance

This first step is very straightforward and does not differ from any other situation where you want to push out changes to a running FMW domain with MyST Studio.
Click on the Actions drop down button and select Update.

Select the correct versions, and press Update. Simple as that!
Now your Platform Instance has the correct information, but that has not been applied yet.

2. Run command on Platform Instance

To apply the new information to our environment, we’ll need to run a specific built-in MyST Action.
Find the Actions drop down button again, but this time select Control.

You’ll be greeted by this interface, select Custom from the drop down list Action.

After clicking on Custom, type in configure-soa and use TAB or ENTER to make this value stick.
Right below the first field, it should read Myst action that shall be invoked, and myst configure-soa fc.

You’re only a click away from execution this action!

If all is well, the log should show you something very similar to what is shown below:

>> Started executing configure-soa
/u01/app/oracle/weblogic/oracle_common/modules/internal/features/jrf_wlsFmw_oracle.jrf.wlst.jar added to the classpath
/u01/app/oracle/weblogic/wlserver/modules/features/wlst.wls.classpath.jar added to the classpath
Connecting to t3://server0001.customer.nl:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "soa_domain".

 Warning: An insecure protocol was used to connect to the server.
 To ensure on-the-wire security, the SSL port or Admin port should be used instead.

 Setting SyncMaxWaitTime [50]
 Setting AuditLevel [Development]
 Setting captureFaultStackTraces [true]
 Setting compositeInstanceStateEnabled [true]
 Disconnected from weblogic server: AdminServer
>> Finished executing configure-soa

The log shows you that SyncMaxWaitTime has been set to [50], so this has been a great succes!

Provisioning a new environment

As promised above, we would also show you how to have this value set by MyST directly when provisioning a new environment.
This can be achieved by using the regularly available method of appending an action to an action which is already being run by MyST during provisioning.

The WLST needed to set MBeans like the one we discuss here requires the Managed Server(s) to be up, so we need to find a phase during provisioning where all requirements are met.
In this case, it is wisest to tack our extra action to the preconfigured action configure.
This, by the way, is similar to the method MyST uses internally to get this result on provisioning of an 11g domain.

Navigate in your Platform Blueprint to the Global Variables page and start an Edit-session.
Add a new Global Variable, and set the following values:

action.configure.post = configure-soa

This will make MyST execute the action configure-soa right after the regularly scheduled action configure. Luckily, at the end of this action (all) Managed Server(s) are up and running, so we won’t run into any issues there.
The same log as above should be shown somewhere at the bottom of a full provisioning log.

When there are other MBeans you want to set with MyST Studio, or if you need a little help, please let us know by either reaching out via twitter @maartentijhof or by leaving a comment below.