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.
The composite application contains composite properties as shown through the property inspector.
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.
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.
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?
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.
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.