public static String getBindingName ( String name ) { // For "java:" names, come up with a reasonable binding name by removing // "java:" and if possible, the scope (e.g., "global") and "env". if ( name . startsWith ( "java:" ) ) { int begin = "java:" . length ( ) ; int index = name . indexOf ( ' ' , begin ) ; if ( index != - 1 ) { begin = index + 1 ; } if ( begin + "env/" . length ( ) <= name . length ( ) && name . regionMatches ( begin , "env/" , 0 , "env/" . length ( ) ) ) { begin += "env/" . length ( ) ; } return name . substring ( begin ) ; } return name ; }
Determine the binding name that will be used for a reference name . This implements basically the same algorithm as default bindings in traditional WAS .