Sorry, just catching up on this thread 2 months later.
You could use the Registry for this, yes. Anywhere you have the
MuleContext available (within most Mule entities), you can get a handle
to the Registry. So to store an object:
muleContext.getRegistry().registerObject("foo", new MyFoo());
Then someplace else you could update the object:
Foo foo = (Foo) muleContext.getRegistry().lookupObject("foo");
foo.setBarVal(25);
// Replace the previous object
muleContext.getRegistry().registerObject("foo");
etc...
Travis
On Thu, 2008-08-07 at 13:54 -0700, richrem wrote:
> Mule gurus,
>
> I was poking around the docs for some hints/ideas/best practices for storing
> application wide runtime info. I ran across the Registry object, available
> from a MuleContext instance. Is this a good place to store runtime
> information that is needed by components or other architectural elements -
> e.g. routers? Or, is there another place where I could/should store
> application wide info that may change over time and is fairly easily
> accessible to various components in the system?
>
> Also, are there any gotchas I should be aware of with the Registry, if that
> is the right place to put stuff?
>
> FYI, we're using Mule 2.0.1 currently.
>
> TIA,
> Rich
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email