I have a problem when using Object store in mule. It cannot share datas with another apps on the same mule server. I have set same as below but cannot using in another app(same server).
<spring:beans>
<spring:bean id="myListableObjectStore"
class="org.mule.util.store.SimpleMemoryObjectStore" />
</spring:beans>
<objectstore:config name="ObjectStore"
objectStore-ref="myListableObjectStore" doc:name="ObjectStore" />
Who have any solution about this, please help me.
Thank you so much!
With the introduction of Mule 3.5 there is the concept of domains which can be used to share resources between applications (although there are some limitations as described in the mule documentation). In this case you want to share the object store spring bean.
In order to do this in Mule 3.5 you should create a domain to do so:
Then you need to create an application which uses the domain. To do so:
The code for the application should look something like:
This app can be deployed both to the usual $MULE_HOME/apps directory or else you can deploy it under the domain folder.
To test this deploy another app that reads the retrieves from the object store such as :
Then hit
http://localhost:8085/mypayload
and when you hithttp://localhost:8081
you should see /mypayload in your browser.