On Sunday 14 December 2003 07:26, Daniel Dekany wrote:
> Saturday, December 13, 2003, 12:01:25 PM, Niclas Hedhman wrote:
>
> [snip]
>
> > Bottom-line Q;
> > Either release() is a requirement or it shouldn't exist. Which?

> So, I think that components that are accessible for app. code developers
> should have lifestyle that requires *no* explicit releasing, 

Discriminatory behaviour? 
I don't feel comfortable with "weak contracts", as that IMHO is the root-cause 
of most bad code out there.

> container should still support the usage of lifestyles that do need
> explicit releasing, for programmers who work on lower lever systems
> (e.g. on a Web app. framework). The default would be that "Don't use
> release()!", with a the foot note "Except if you hack the guts of
> something, and you *know* that a component requires release(). Don't
> expose such object for user code developers.".

Let's compare with 

FileInputStream in = new FileInputStream( filename );

Do you mean that the "web application developer" should be Ok not to close the 
stream?
And that the "framework" should "somehow" handle it (especially since there is 
a separate debate whether it is possible to safe guard through the GC at 
all)...

If you have N x 1000 request coming in over a short period of time, you could 
be running out of file handles, for no real reason (other than bad code). The 
"web application developer" don't want this, but "has forgotten" about it, 
which leads to my "Report inappropriate use.", so he can find out about it 
before it is in a production system.


Niclas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to