commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: [beanutils] Re: Beans.instantiate [WAS Re: Beans.instantiate]
Date Sun, 13 Jun 2004 22:42:42 GMT
On Mon, 2004-06-14 at 07:48, robert burrell donkin wrote:
> please remember to prefix with the name of the component.
> On 13 Jun 2004, at 13:25, Hanson Char wrote:
> > The JavaBean spec 1.01 (Section 10.3) recommends in general to use
> > Beans.instantiate when creating beans.  Any reason why the 
> > common-beanutils
> > does not follow the recommendataion ?
> if this question means: why wasn't the source written in this way then 
> i'm afraid that someone who was involved with the beanutils early years 
> (like craig) would need to jump in.
> if (on the other hand) you have strong arguments for changes to 
> specific lines of code, then it'd easier if you'd outline the specific 
> changes and the reasons why you propose them.

I believe the Beans.instantiate method scans the disk looking for a
serialized bean file to initialize the new object with. In general this
is a bad idea, as it requires several disk IO operations per object

Sun's idea was that for GUI applications, this would allow the
application "state" to be saved as a bunch of serialized beans on disk
and by using Beans.instantiate they will pop up on the screen with the
same layout, size, etc. as when the app was last used (ie when the beans
were last serialized to disk). However not all of Sun's ideas are bright
ones - and I think this is one of the dimmer ones (though not as bad as
distributing org.apache.xalan in the rt.jar for java 1.4!).

I think *very few* users of BeanUtils will want the option to restore
the beans from serialized files.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message