Re: Problem w MBean

Paul Hammant <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.apps.devel
Message-ID <[email protected]>
Mateusz,

>I have a one question. Lets imagine we have an WebServer which is a Avalon
>Service managed by Phoenix.
>
>We export
>
>public interface WebMBean{
>    void setPort(int port);
>    int getPort();
>}
>
>Of course our compoenent implements this bean
>
>Of the other hand we have configuration in which we store the port of the
>server.
>
>Now Server starts. Default port is read from config. We manager server and
>invoke it's setPort().
>
>The port changes. But after we shutdown phoenix. We cannot make this change
>persistent because
>
>Configuration object is not writeable.
>
>How could I workaround this.
>
You'll have to serialize some object that is loaded (if present) after 
configure() is processed.

We hae been asked to look at a changable configuration design a few 
times before.  We might come up with a secure design on year soon.

- Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.