Retrieves the naming context bound to the current thread. @return The naming context bound to the current thread. @throws NamingException If no naming context is bound to the current thread
()
| 172 | * @throws NamingException If no naming context is bound to the current thread |
| 173 | */ |
| 174 | public static Context getThread() throws NamingException { |
| 175 | Context context = threadBindings.get(Thread.currentThread()); |
| 176 | if (context == null) { |
| 177 | throw new NamingException(sm.getString("contextBindings.noContextBoundToThread")); |
| 178 | } |
| 179 | return context; |
| 180 | } |
| 181 | |
| 182 | |
| 183 | /** |
no test coverage detected