private void makeWiring ( WebSphereBeanDeploymentArchive wireFromBda , WebSphereBeanDeploymentArchive wireToBda , ClassLoader wireToBdaCL , ClassLoader wireFromBdaCL ) { while ( wireFromBdaCL != null ) { if ( wireFromBdaCL == wireToBdaCL ) { wireFromBda . addBeanDeploymentArchive ( wireToBda ) ; break ; } else { wireFromBdaCL = wireFromBdaCL . getParent ( ) ; } } //if we are here, it means the wireToBdaCL is root classloader, loading java.xx classes. All other bdas should be accessible to this new bda. if ( wireFromBdaCL == wireToBdaCL ) { wireFromBda . addBeanDeploymentArchive ( wireToBda ) ; } }
Make a wiring from the wireFromBda to the wireToBda if the wireFromBda s classloader is the descendant of the wireToBda s classloader