Hi Ashish,

Java provides few guarantees about when garbage collection
occurs.  You should not be closing any resource in a finalize
method, except as a last resort in case of failure.

Hope this helps.

-Dan


On 24 Apr 00, at 17:34, Ashish Bhatia wrote:

> Hi,
>     I have installed J2EE server on Windows 95 machine. I am using JSP to
> directly call the methods in the .class file (without creating beans). I
> create a connection to the SQL server 7.0 database in the constructor of my
> Java class and close the connection in the finalize method.
> My J2EE server crashes after I move from one JSP page to another. It seems
> that the finalize method is not called and hence the connection object is
> not being closed when I move from one page to another.
> Can anyone help in solving this problem.
>
>
> Ashish Bhatia
> TSG @6203447
>
>
>
> Visit http://www.niit.com for eCommerce Solutions.
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to