Hi youngho,
How is Chosen? This is no doubt oversimplified, but if I understand
your question, you are losing the referenced object when you load the new
instance and reset the object reference, which is normal.
If possible, you should check what the client requested first, then load
your new instance only of they are asking for different data, i.e. don't
blindly load the new instance, otherwise use the old instance.
If the former is not possible for some reason, have another object
reference and set it to the instance at the end of your operations on the
current set:
somedataref = HT;
..... // do work
olddataref = somedataref;
Then when you discover the client wants 'more detailed info' either use
the old one directly, set the new one to the old one, or copy the data as
appropriate.
Joe Sam
-----Original Message-----
From: Youngho Cho <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, July 28, 1999 12:28 AM
Subject: How can I reuse a data at the dynamic class roading servlet
>Hi,
>I have a question.
>I use a dynamic class roading mathod using Class.forName method in my
controll servlet.
>( there is only one control servlet and many transaction classes)
>At the one stage, I got a client requested parameter through getParameter
method ,
>pass the parameter to my DB , received some data ( Let's call HT ) from DB
and return back a part of data to
>the client. Ath the next stage ( reload a new class ) , if a client request
a more detail data
>then I would like to reuse HT.
>But my problem is whenever the Class reload , the HT becomes null !.
>I would like to know how can I reuse a data even after the class reload at
the dynamic class roading method.
>Any codelet or suggestions appreciates.
>
>Thanks in advance.
>
>youngho
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html