Hi Rickard
IMO I wouldn't make it to a rule of thumb. I would assume that when I
change an attribute then it is changed (when it is writeable) but
I wouldn't assume that it has to trigger some actions.
If you have to use STOP and START to apply settings is up to the
design like when you install a program under W2K to restart the
computer.
I would say that when an attribute can throw an exception because it
triggers some actions it shouldn't become an attribute. Therefore
instead of setting the STATE attribute to "STOPPED" call a method
stop().
Have fun - Andy
-----Original Message-----
From: Rickard �berg [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 12:03 AM
To: jBoss Developer
Subject: Re: [jBoss-Dev] Major update in CVS
Yes, but even if it is initialized I would recommend setting them in
initService(), or startService(). Why? Because set methods should never
throw exceptions, so if any change in attributes have any potential at
all of giving an exception you should apply it in init or start, because
they are specifically designed to throw exceptions if something goes
wrong. You can think of startService as "apply settings and start". So,
if you follow the above users will be able to change settings first in
their own pace (through some GUI for example) and when they feel they
have a good configuration they do "stop" and "start" to apply them. This
is much safer than to apply the settings directly in the set methods.
regards,
Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]