Strips the URL header. @param name The name @return the parsed name @throws NamingException if there is no "java:" header or if no naming context has been bound to this thread
(String name)
| 380 | * @throws NamingException if there is no "java:" header or if no naming context has been bound to this thread |
| 381 | */ |
| 382 | protected String parseName(String name) throws NamingException { |
| 383 | |
| 384 | if ((!initialContext) && (name.startsWith(prefix))) { |
| 385 | return name.substring(prefixLength); |
| 386 | } else { |
| 387 | if (initialContext) { |
| 388 | return name; |
| 389 | } else { |
| 390 | throw new NamingException(sm.getString("selectorContext.noJavaUrl")); |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | } |
| 395 | |
| 396 | |
| 397 | /** |
no test coverage detected