private boolean hasReferringDU ( ) throws Exception { // Get SleeContainer instance from JNDI SleeContainer sC = SleeContainer . lookupFromJndi ( ) ; for ( String componentIdString : this . getComponents ( ) ) { ComponentIDPropertyEditor cidpe = new ComponentIDPropertyEditor ( ) ; cidpe . setAsText ( componentIdString ) ; ComponentID componentId = ( ComponentID ) cidpe . getValue ( ) ; for ( ComponentID referringComponentId : sC . getComponentRepository ( ) . getReferringComponents ( componentId ) ) { ComponentIDPropertyEditor rcidpe = new ComponentIDPropertyEditor ( ) ; rcidpe . setValue ( referringComponentId ) ; String referringComponentIdString = rcidpe . getAsText ( ) ; if ( ! this . getComponents ( ) . contains ( referringComponentIdString ) ) { return true ; } } } return false ; }
Method for checking if this DU components are referred by any others .