connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Util.java
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());
    }
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.

@param modelNode the model node; either an operation or the model behind a datasource resource

@return the compliant jndi name