< prev index next >

test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test
  25  * @bug 4116437
  26  * @summary Distributed Garbage Collector Memory Leak
  27  *
  28  * @author Laird Dornin
  29  *
  30  * @library ../../testlibrary




  31  * @build TestLibrary CheckLeaseLeak_Stub LeaseLeakClient LeaseLeak
  32  * @run main/othervm/timeout=240 CheckLeaseLeak
  33  *
  34  */
  35 
  36 /**
  37  * A bug in sun.rmi.transport.DGCImp.checkLeases() results in memory
  38  * leak of LeaseInfo objects.
  39  *
  40  * In order to verify that this problem no longer exists, we create a
  41  * remote object and a serveral clients in different VMs. The clients
  42  * call a remote method on an exported object. This will cause the rmi
  43  * runtime to create several references (all with different vmids) to
  44  * the remote object.  Each vmid needs a seperate LeaseInfo object in
  45  * the object table target DGCImpl.leaseTable.  If the leak is fixed,
  46  * the leaseTable field will contain no objects.  We use reflection to
  47  * find the number of objects contained in this table.
  48  */
  49 
  50 import java.rmi.*;




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test
  25  * @bug 4116437
  26  * @summary Distributed Garbage Collector Memory Leak
  27  *
  28  * @author Laird Dornin
  29  *
  30  * @library ../../testlibrary
  31  * @modules java.rmi/sun.rmi.registry
  32  *          java.rmi/sun.rmi.server
  33  *          java.rmi/sun.rmi.transport
  34  *          java.rmi/sun.rmi.transport.tcp
  35  * @build TestLibrary CheckLeaseLeak_Stub LeaseLeakClient LeaseLeak
  36  * @run main/othervm/timeout=240 CheckLeaseLeak
  37  *
  38  */
  39 
  40 /**
  41  * A bug in sun.rmi.transport.DGCImp.checkLeases() results in memory
  42  * leak of LeaseInfo objects.
  43  *
  44  * In order to verify that this problem no longer exists, we create a
  45  * remote object and a serveral clients in different VMs. The clients
  46  * call a remote method on an exported object. This will cause the rmi
  47  * runtime to create several references (all with different vmids) to
  48  * the remote object.  Each vmid needs a seperate LeaseInfo object in
  49  * the object table target DGCImpl.leaseTable.  If the leak is fixed,
  50  * the leaseTable field will contain no objects.  We use reflection to
  51  * find the number of objects contained in this table.
  52  */
  53 
  54 import java.rmi.*;


< prev index next >