1 28 29 package com.caucho.naming; 30 31 import com.caucho.log.Log; 32 import com.caucho.util.L10N; 33 34 import javax.naming.Context ; 35 import javax.naming.Name ; 36 import javax.naming.NameParser ; 37 import javax.naming.NamingEnumeration ; 38 import javax.naming.NamingException ; 39 import java.util.Hashtable ; 40 import java.util.logging.Logger ; 41 42 45 public class ErrorContext implements Context { 46 protected static final Logger log = Log.open(ErrorContext.class); 47 protected static L10N L = new L10N(ErrorContext.class); 48 49 protected NamingException exception; 50 51 public ErrorContext(Throwable exn) 52 { 53 if (exn instanceof NamingException ) 54 this.exception = (NamingException ) exn; 55 else 56 this.exception = new NamingExceptionWrapper(exn); 57 } 58 59 63 public Object lookup(String name) 64 throws NamingException 65 { 66 throw exception; 67 } 68 69 72 public Object lookup(Name name) 73 throws NamingException 74 { 75 throw exception; 76 } 77 78 public Object lookupLink(String name) 79 throws NamingException 80 { 81 throw exception; 82 } 83 84 public Object lookupLink(Name name) 85 throws NamingException 86 { 87 throw exception; 88 } 89 90 public void bind(String name, Object obj) 91 throws NamingException 92 { 93 throw exception; 94 } 95 96 public void bind(Name name, Object obj) 97 throws NamingException 98 { 99 throw exception; 100 } 101 102 public void rebind(String name, Object obj) 103 throws NamingException 104 { 105 throw exception; 106 } 107 108 public void rebind(Name name, Object obj) 109 throws NamingException 110 { 111 throw exception; 112 } 113 114 public void unbind(String name) 115 throws NamingException 116 { 117 throw exception; 118 } 119 120 public void unbind(Name name) 121 throws NamingException 122 { 123 throw exception; 124 } 125 126 public void rename(String oldName, String newName) 127 throws NamingException 128 { 129 throw exception; 130 } 131 132 public void rename(Name oldName, Name newName) 133 throws NamingException 134 { 135 throw exception; 136 } 137 138 public NamingEnumeration list(String name) 139 throws NamingException 140 { 141 throw exception; 142 } 143 144 public NamingEnumeration list(Name name) 145 throws NamingException 146 { 147 throw exception; 148 } 149 150 public NamingEnumeration listBindings(String name) 151 throws NamingException 152 { 153 throw exception; 154 } 155 156 public NamingEnumeration listBindings(Name name) 157 throws NamingException 158 { 159 throw exception; 160 } 161 162 public Context createSubcontext(String name) 163 throws NamingException 164 { 165 throw exception; 166 } 167 168 public Context createSubcontext(Name name) 169 throws NamingException 170 { 171 throw exception; 172 } 173 174 public void destroySubcontext(String name) 175 throws NamingException 176 { 177 throw exception; 178 } 179 180 public void destroySubcontext(Name name) 181 throws NamingException 182 { 183 throw exception; 184 } 185 186 public NameParser getNameParser(String name) 187 throws NamingException 188 { 189 throw exception; 190 } 191 192 public NameParser getNameParser(Name name) 193 throws NamingException 194 { 195 throw exception; 196 } 197 198 public String composeName(String prefix, String suffix) 199 throws NamingException 200 { 201 throw exception; 202 } 203 204 public Name composeName(Name prefix, Name suffix) 205 throws NamingException 206 { 207 throw exception; 208 } 209 210 public String getNameInNamespace() 211 throws NamingException 212 { 213 throw exception; 214 } 215 216 public Object addToEnvironment(String prop, Object value) 217 throws NamingException 218 { 219 throw exception; 220 } 221 222 public Object removeFromEnvironment(String prop) 223 throws NamingException 224 { 225 throw exception; 226 } 227 228 public Hashtable getEnvironment() 229 throws NamingException 230 { 231 throw exception; 232 } 233 234 238 public void close() 239 throws NamingException 240 { 241 throw exception; 242 } 243 } 244 | Popular Tags |