public static void checkAccessibility ( String resourceName , String adapterName , String embeddedApp , String accessingApp , boolean isEndpoint ) throws ResourceException { if ( embeddedApp != null ) { if ( ! embeddedApp . equals ( accessingApp ) ) { String msg = null ; if ( isEndpoint ) { if ( accessingApp != null ) { msg = TraceNLS . getFormattedMessage ( Utils . class , tc . getResourceBundleName ( ) , "J2CA8810.embedded.activation.failed" , new Object [ ] { resourceName , adapterName , embeddedApp , accessingApp } , "J2CA8810.embedded.activation.failed" ) ; } else { msg = TraceNLS . getFormattedMessage ( Utils . class , tc . getResourceBundleName ( ) , "J2CA8812.embedded.activation.failed" , new Object [ ] { resourceName , adapterName , embeddedApp } , "J2CA8812.embedded.activation.failed" ) ; } } else { if ( accessingApp != null ) { msg = TraceNLS . getFormattedMessage ( Utils . class , tc . getResourceBundleName ( ) , "J2CA8809.embedded.lookup.failed" , new Object [ ] { resourceName , adapterName , embeddedApp , accessingApp } , "J2CA8809.embedded.lookup.failed" ) ; } else { msg = TraceNLS . getFormattedMessage ( Utils . class , tc . getResourceBundleName ( ) , "J2CA8811.embedded.lookup.failed" , new Object [ ] { resourceName , adapterName , embeddedApp } , "J2CA8811.embedded.lookup.failed" ) ; } } throw new ResourceException ( msg ) ; } } }
Check accessibility of the resource adapter from the application .