ma.glasnost.orika.test.perf
Class ClassLoaderLeakageTestCase

java.lang.Object
  extended by ma.glasnost.orika.test.perf.ClassLoaderLeakageTestCase

public class ClassLoaderLeakageTestCase
extends Object

This test attempts to confirm that Orika doesn't cause class-loaders to leak by retaining hard references to classes that were not loaded by it's own class-loader or any parent class-loader(s).

This can cause problems specifically in web and enterprise application contexts where multiple web application (siblings) might share a common parent enterprise application (or shared library) class-loader.

Author:
mattdeboer

Constructor Summary
ClassLoaderLeakageTestCase()
           
 
Method Summary
 void testClassLoaderLeak()
          This test is a bit complicated: it verifies that super-type lookup occurs properly if presented with a class that is not accessible from the current class loader, but which extends some super-type (or implements an interface) which is accessible.
This type of scenario might occur in web-module to ejb jar interactions...
 void testControl()
          This initial test is to verify our own sanity
 void testLeak_registerMapChildClasses()
          This test attempts to have a child class-loader register a class-mapping using a class which is only visible to this child loader; currently, this fails because Orika throws exception on finding a class which is not accessible to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderLeakageTestCase

public ClassLoaderLeakageTestCase()
Method Detail

testControl

public void testControl()
                 throws Throwable
This initial test is to verify our own sanity

Throws:
Throwable

testClassLoaderLeak

public void testClassLoaderLeak()
                         throws Exception
This test is a bit complicated: it verifies that super-type lookup occurs properly if presented with a class that is not accessible from the current class loader, but which extends some super-type (or implements an interface) which is accessible.
This type of scenario might occur in web-module to ejb jar interactions...

Throws:
Exception

testLeak_registerMapChildClasses

public void testLeak_registerMapChildClasses()
                                      throws Throwable
This test attempts to have a child class-loader register a class-mapping using a class which is only visible to this child loader; currently, this fails because Orika throws exception on finding a class which is not accessible to it.

Throws:
Exception
Throwable


Copyright © 2012 Glasnost. All Rights Reserved.