Updating composite properties on runtime (and being misled by the mbean browser) image110

Updating composite properties on runtime (and being misled by the mbean browser)

Recently I walked into something strange.
I had developed a simple composite application. The application is used to read a file and route the content to another service.

image1

The composite application contains composite properties as shown through the property inspector.

image2

Within the composite I am using a file-adapter to read a file. The content of this file is pre-processed in an associated valve.
How to pre-process this file, depends on the value of the composite properties. When specifications are changing over time I want to change the value of these properties on runtime via the Enterprise Manager.

For this I user the System MBean Browser. In the MBean I selected: ‘Application Defined MBeans –> oracle.soa.config –> SCAComposite –> the SCAService in question’ –> and finally the properties. There I updated some of the properties and pressed the apply button to save my changes.

If you do not know exactly how to do this, the following six screenshots might be useful.

image3
image4
image5
image6
image7
image8

After updating some properties it was time for a test. To my suprise, the valve did not saw the updated values, but still retrieved the old values.
How could that be? To find this out I returned to the MBean browser. It still had the new values. So why are the not used?

The properties are also accessible via the service/reference properties. So I checkt these.

image9

Here I also saw the new values (even a reboot of the server did not change this). But stil the question: why are they not used?

image10

I found the solution in this screen. When I pressed the apply button in this screen, I got the question whether I would like to save my changes. After confirming this, the valve recognized the new values.

image11

So What did actually happened?

Some testing, brought me to the following analysis:

Applying in the MBean saves the values in the MBean. This MBean is part of/stored in weblogic. During application deployment the composite properties are extracted and added to this MBean.
Via the MBean browser these values are updated, and not the values in the composite. The valve I made is reading from the composite (using the getPipeline().getPipelineContext().getProperty() operations). These properties (and also the MBean properties) are updated when I used the method to update the properties via the service/reference properties. So in this use case the MBean browser is not useable and even very misleading.

2 Comments

  1. Siddharth December 29, 2015
  2. seekjp April 15, 2015