Thursday, February 04, 2016

Configuring Work Manager in SOA OSB 12c



The prioritization of work in weblogic server is based on an execution model which takes into account user/admin defined parameters and actual performance of the server. Weblogic server allows developer to configure work manager to prioritize pending works and improve performance of process. In this exercise we will try to understand how we can configure work managers in SOA/OSB 12c to improve the performance of services.


We will have a look in OSB configuration first as it is straight forward and then we will check on SOA configuration.

WorkManager can be configured in OSB for proxy as well as business services.

Work Manager when configured on Proxy service is used to limit the number of threads running a proxy Service and Work Manager when configured for a Business service used to limit the number of threads that process response from the back end system. It is important to understand that work managers are used to prioritize work unlike throttling which is used to restricts the number of records. So there is a chance that you might loose some data when you have enabled throttling but with work manager you will not loose the data, it will be jsut the prioritization of service will change.

As per oracle documentation

https://docs.oracle.com/middleware/1213/osb/develop/GUID-7A9661AE-6FE5-4A92-A418-694A84D0B0BF.htm#OSBDV89434


The Work Manager (dispatch policy) configuration for a business service should depend on how the business service is invoked. If a proxy service invokes the business service using a service callout, a publish action, or routing with exactly-once QoS (as described in Pipeline Actions), consider using different Work Managers for the proxy service and the business service instead of using the same for both. For the business service Work Manager, configure the Min Thread Constraint property to a small number (1-3) to guarantee an available thread.

Now without going much in to theoretical details we will see how we can configure work manager in OSB 12c. The concept is similar to that of 11g however the screens have changed for osb applications.

So we will first go ahead and login to admin console.

http://host:port/console

Go to Environment-->Work Managers



Create new and create a minimum thread constraint.

Minimum thread constraint ensure that whatever may be the load in the server this minimum number of
threads will be allocated to the service.



Give it a logical name and assign minimum thread

by default it is -1 which mean infinite.



Say next and point it to the server.

Next again go to the work manager and this time create a work manager



Give it some logical name



Next point it to server and finish the wizard


You can now go to your work manager and select the constraint you have defined



Save the changes.

Now once you have the work manager created you just need to attach this work manager to the business process in OSB.

Open up the osb console

http://host:port/sbconsole

Go to your business service

go to transport details

and select the work manager that you have created in the previous steps.



Save the changes and reactivate your session.

For configuring work manager in soa we do not much options.

SOA Services uses a defalt work manager called as wm/SOAWorkManager


YOu can configure your own constraints and update the work managers to use the contraints.



3 comments:

srika said...

I'm afraid is this tested? Because "http://host:port/sbconsole" is no more accessible in 12c. its "http://host:port/servicebus" now. And can you please explain the thread management between sole pipelines?

srika said...

Hi,
I am searching for any article that talks about pipeline thread flow in OSB 12c. I have a design where a service callout is made to another pipeline (or proxy) from master request pipeline. And the second pipeline makes a business routing. In this case, will the thread be waiting at master pipeline or the business service thread that second pipeline gives out handles the rest of the flow.

MasterPipe -- (servica callout) --> second pipeline(no proxy) --> business route --> second pipeline --> MasterPipeline.

Could you please explain the thread flow here? And can we configure a work manager to pipeline (not proxy)?

srika said...

Hi,
I am searching for any article that talks about pipeline thread flow in OSB 12c. I have a design where a service callout is made to another pipeline (proxyless pipeline) from master request pipeline. And the second pipeline makes a business routing. In this case, will the thread be waiting at master pipeline or the business service thread that second pipeline gives out handles the rest of the flow.

MasterPipeline -- (service callout) --> second pipeline(proxyless pipeline) --> business route --> second pipeline --> MasterPipeline.

Could you please explain the thread flow here? And can we configure a work manager to pipeline (Proxyless pipeline)?