public static String getJndiName ( final OperationContext context , final ModelNode modelNode ) throws OperationFailedException { final String rawJndiName = JNDI_NAME . resolveModelAttribute ( context , modelNode ) . asString ( ) ; return cleanJndiName ( rawJndiName , modelNode . hasDefined ( USE_JAVA_CONTEXT . getName ( ) ) && modelNode . get ( USE_JAVA_CONTEXT . getName ( ) ) . asBoolean ( ) ) ; }
Extracts the raw JNDINAME value from the given model node and depending on the value and the value of any USE_JAVA_CONTEXT child node converts the raw name into a compliant jndi name .