Edit D:\app\Administrator\product\11.2.0\dbhome_1\javavm\demo\examples\jsproc\basic\objbyref\README.txt
/ / $Header: README.txt 05-jan-2004.15:43:35 etucker Exp $ / / README.txt / / Copyright (c) Oracle Corporation 2000. All Rights Reserved. / / NAME / README.txt - <one-line expansion of the name> / / DESCRIPTION / <short description of component this file declares/defines> / / NOTES / <other useful comments, qualifications, etc.> / / MODIFIED (MM/DD/YY) / etucker 01/05/04 - remove sqlj / joduinn 01/08/02 - Merged joduinn_move_demos_from_jis_to_javavm_vob_main / ielayyan 03/14/00 - Add OCCS header / javam/demo/objbyref example --------------------------- This example shows how to return to a JDBC client a reference to a Java object running in server. This is achieved by returning the object reference as a NUMBER to the client and using the number as an index in a static Vector of objects on the server side. Note: This technique prevents the objects on the server side from being garbage collected as the static Vector contains a pointer to them. It would be a good idea to add a "drop" method that removes the object from the static vector. On the server side, the class EmployeeObject (EmployeeObject.java) represents employees loaded form the database. The class EmployeeByRef (EmployeeByRef.java) manages instances of EmployeeObject by storing them in a static Vector of references. It provides a getEmployee method that returns the index of the EmployeeObject in the vector. On the client side, references to server-side EmployeeObject instances are represented by the EmployeeClientObject class (EmployeeClientObject.java). This class is mostly a wrapper for the index of corresponding EmployeeObject in the server. It provides methods to manage the employee attributes from the client. The client program is Client.java.
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de