1 6 package com.sun.corba.se.impl.logging ; 7 8 import java.util.logging.Logger ; 9 import java.util.logging.Level ; 10 11 import org.omg.CORBA.OMGVMCID ; 12 import com.sun.corba.se.impl.util.SUNVMCID ; 13 import org.omg.CORBA.CompletionStatus ; 14 import org.omg.CORBA.SystemException ; 15 16 import com.sun.corba.se.spi.orb.ORB ; 17 18 import com.sun.corba.se.spi.logging.LogWrapperFactory; 19 20 import com.sun.corba.se.spi.logging.LogWrapperBase; 21 22 import org.omg.CORBA.INITIALIZE ; 23 import org.omg.CORBA.INTERNAL ; 24 import org.omg.CORBA.OBJECT_NOT_EXIST ; 25 26 public class ActivationSystemException extends LogWrapperBase { 27 28 public ActivationSystemException( Logger logger ) 29 { 30 super( logger ) ; 31 } 32 33 private static LogWrapperFactory factory = new LogWrapperFactory() { 34 public LogWrapperBase create( Logger logger ) 35 { 36 return new ActivationSystemException( logger ) ; 37 } 38 } ; 39 40 public static ActivationSystemException get( ORB orb, String logDomain ) 41 { 42 ActivationSystemException wrapper = 43 (ActivationSystemException) orb.getLogWrapper( logDomain, 44 "ACTIVATION", factory ) ; 45 return wrapper ; 46 } 47 48 public static ActivationSystemException get( String logDomain ) 49 { 50 ActivationSystemException wrapper = 51 (ActivationSystemException) ORB.staticGetLogWrapper( logDomain, 52 "ACTIVATION", factory ) ; 53 return wrapper ; 54 } 55 56 60 public static final int CANNOT_READ_REPOSITORY_DB = SUNVMCID.value + 401 ; 61 62 public INITIALIZE cannotReadRepositoryDb( CompletionStatus cs, Throwable t ) { 63 INITIALIZE exc = new INITIALIZE ( CANNOT_READ_REPOSITORY_DB, cs ) ; 64 if (t != null) 65 exc.initCause( t ) ; 66 67 if (logger.isLoggable( Level.WARNING )) { 68 Object [] parameters = null ; 69 doLog( Level.WARNING, "ACTIVATION.cannotReadRepositoryDb", 70 parameters, ActivationSystemException.class, exc ) ; 71 } 72 73 return exc ; 74 } 75 76 public INITIALIZE cannotReadRepositoryDb( CompletionStatus cs ) { 77 return cannotReadRepositoryDb( cs, null ) ; 78 } 79 80 public INITIALIZE cannotReadRepositoryDb( Throwable t ) { 81 return cannotReadRepositoryDb( CompletionStatus.COMPLETED_NO, t ) ; 82 } 83 84 public INITIALIZE cannotReadRepositoryDb( ) { 85 return cannotReadRepositoryDb( CompletionStatus.COMPLETED_NO, null ) ; 86 } 87 88 public static final int CANNOT_ADD_INITIAL_NAMING = SUNVMCID.value + 402 ; 89 90 public INITIALIZE cannotAddInitialNaming( CompletionStatus cs, Throwable t ) { 91 INITIALIZE exc = new INITIALIZE ( CANNOT_ADD_INITIAL_NAMING, cs ) ; 92 if (t != null) 93 exc.initCause( t ) ; 94 95 if (logger.isLoggable( Level.WARNING )) { 96 Object [] parameters = null ; 97 doLog( Level.WARNING, "ACTIVATION.cannotAddInitialNaming", 98 parameters, ActivationSystemException.class, exc ) ; 99 } 100 101 return exc ; 102 } 103 104 public INITIALIZE cannotAddInitialNaming( CompletionStatus cs ) { 105 return cannotAddInitialNaming( cs, null ) ; 106 } 107 108 public INITIALIZE cannotAddInitialNaming( Throwable t ) { 109 return cannotAddInitialNaming( CompletionStatus.COMPLETED_NO, t ) ; 110 } 111 112 public INITIALIZE cannotAddInitialNaming( ) { 113 return cannotAddInitialNaming( CompletionStatus.COMPLETED_NO, null ) ; 114 } 115 116 120 public static final int CANNOT_WRITE_REPOSITORY_DB = SUNVMCID.value + 401 ; 121 122 public INTERNAL cannotWriteRepositoryDb( CompletionStatus cs, Throwable t ) { 123 INTERNAL exc = new INTERNAL ( CANNOT_WRITE_REPOSITORY_DB, cs ) ; 124 if (t != null) 125 exc.initCause( t ) ; 126 127 if (logger.isLoggable( Level.WARNING )) { 128 Object [] parameters = null ; 129 doLog( Level.WARNING, "ACTIVATION.cannotWriteRepositoryDb", 130 parameters, ActivationSystemException.class, exc ) ; 131 } 132 133 return exc ; 134 } 135 136 public INTERNAL cannotWriteRepositoryDb( CompletionStatus cs ) { 137 return cannotWriteRepositoryDb( cs, null ) ; 138 } 139 140 public INTERNAL cannotWriteRepositoryDb( Throwable t ) { 141 return cannotWriteRepositoryDb( CompletionStatus.COMPLETED_NO, t ) ; 142 } 143 144 public INTERNAL cannotWriteRepositoryDb( ) { 145 return cannotWriteRepositoryDb( CompletionStatus.COMPLETED_NO, null ) ; 146 } 147 148 public static final int SERVER_NOT_EXPECTED_TO_REGISTER = SUNVMCID.value + 403 ; 149 150 public INTERNAL serverNotExpectedToRegister( CompletionStatus cs, Throwable t ) { 151 INTERNAL exc = new INTERNAL ( SERVER_NOT_EXPECTED_TO_REGISTER, cs ) ; 152 if (t != null) 153 exc.initCause( t ) ; 154 155 if (logger.isLoggable( Level.WARNING )) { 156 Object [] parameters = null ; 157 doLog( Level.WARNING, "ACTIVATION.serverNotExpectedToRegister", 158 parameters, ActivationSystemException.class, exc ) ; 159 } 160 161 return exc ; 162 } 163 164 public INTERNAL serverNotExpectedToRegister( CompletionStatus cs ) { 165 return serverNotExpectedToRegister( cs, null ) ; 166 } 167 168 public INTERNAL serverNotExpectedToRegister( Throwable t ) { 169 return serverNotExpectedToRegister( CompletionStatus.COMPLETED_NO, t ) ; 170 } 171 172 public INTERNAL serverNotExpectedToRegister( ) { 173 return serverNotExpectedToRegister( CompletionStatus.COMPLETED_NO, null ) ; 174 } 175 176 public static final int UNABLE_TO_START_PROCESS = SUNVMCID.value + 404 ; 177 178 public INTERNAL unableToStartProcess( CompletionStatus cs, Throwable t ) { 179 INTERNAL exc = new INTERNAL ( UNABLE_TO_START_PROCESS, cs ) ; 180 if (t != null) 181 exc.initCause( t ) ; 182 183 if (logger.isLoggable( Level.WARNING )) { 184 Object [] parameters = null ; 185 doLog( Level.WARNING, "ACTIVATION.unableToStartProcess", 186 parameters, ActivationSystemException.class, exc ) ; 187 } 188 189 return exc ; 190 } 191 192 public INTERNAL unableToStartProcess( CompletionStatus cs ) { 193 return unableToStartProcess( cs, null ) ; 194 } 195 196 public INTERNAL unableToStartProcess( Throwable t ) { 197 return unableToStartProcess( CompletionStatus.COMPLETED_NO, t ) ; 198 } 199 200 public INTERNAL unableToStartProcess( ) { 201 return unableToStartProcess( CompletionStatus.COMPLETED_NO, null ) ; 202 } 203 204 public static final int SERVER_NOT_RUNNING = SUNVMCID.value + 406 ; 205 206 public INTERNAL serverNotRunning( CompletionStatus cs, Throwable t ) { 207 INTERNAL exc = new INTERNAL ( SERVER_NOT_RUNNING, cs ) ; 208 if (t != null) 209 exc.initCause( t ) ; 210 211 if (logger.isLoggable( Level.WARNING )) { 212 Object [] parameters = null ; 213 doLog( Level.WARNING, "ACTIVATION.serverNotRunning", 214 parameters, ActivationSystemException.class, exc ) ; 215 } 216 217 return exc ; 218 } 219 220 public INTERNAL serverNotRunning( CompletionStatus cs ) { 221 return serverNotRunning( cs, null ) ; 222 } 223 224 public INTERNAL serverNotRunning( Throwable t ) { 225 return serverNotRunning( CompletionStatus.COMPLETED_NO, t ) ; 226 } 227 228 public INTERNAL serverNotRunning( ) { 229 return serverNotRunning( CompletionStatus.COMPLETED_NO, null ) ; 230 } 231 232 236 public static final int ERROR_IN_BAD_SERVER_ID_HANDLER = SUNVMCID.value + 401 ; 237 238 public OBJECT_NOT_EXIST errorInBadServerIdHandler( CompletionStatus cs, Throwable t ) { 239 OBJECT_NOT_EXIST exc = new OBJECT_NOT_EXIST ( ERROR_IN_BAD_SERVER_ID_HANDLER, cs ) ; 240 if (t != null) 241 exc.initCause( t ) ; 242 243 if (logger.isLoggable( Level.WARNING )) { 244 Object [] parameters = null ; 245 doLog( Level.WARNING, "ACTIVATION.errorInBadServerIdHandler", 246 parameters, ActivationSystemException.class, exc ) ; 247 } 248 249 return exc ; 250 } 251 252 public OBJECT_NOT_EXIST errorInBadServerIdHandler( CompletionStatus cs ) { 253 return errorInBadServerIdHandler( cs, null ) ; 254 } 255 256 public OBJECT_NOT_EXIST errorInBadServerIdHandler( Throwable t ) { 257 return errorInBadServerIdHandler( CompletionStatus.COMPLETED_NO, t ) ; 258 } 259 260 public OBJECT_NOT_EXIST errorInBadServerIdHandler( ) { 261 return errorInBadServerIdHandler( CompletionStatus.COMPLETED_NO, null ) ; 262 } 263 264 265 } 266 | Popular Tags |