1 21 22 package org.apache.derby.iapi.services.loader; 23 24 import org.apache.derby.iapi.services.context.ContextImpl; 25 import org.apache.derby.iapi.services.context.ContextManager; 26 import org.apache.derby.iapi.services.property.PersistentSet; 27 import org.apache.derby.iapi.error.ExceptionSeverity; 28 import org.apache.derby.iapi.error.StandardException; 29 30 35 public abstract class ClassFactoryContext extends ContextImpl { 36 37 public static final String CONTEXT_ID = "ClassFactoryContext"; 38 39 private final ClassFactory cf; 40 41 protected ClassFactoryContext(ContextManager cm, ClassFactory cf) { 42 43 super(cm, CONTEXT_ID); 44 45 this.cf = cf; 46 } 47 48 public final ClassFactory getClassFactory() { 49 return cf; 50 } 51 52 58 public abstract Object getLockSpace() throws StandardException; 59 60 63 public abstract PersistentSet getPersistentSet() throws StandardException; 64 65 69 public abstract JarReader getJarReader(); 70 71 75 public final void cleanupOnError(Throwable error) { 76 if (error instanceof StandardException) { 77 78 StandardException se = (StandardException) error; 79 80 if (se.getSeverity() >= ExceptionSeverity.SESSION_SEVERITY) 81 popMe(); 82 } 83 } 84 } 85 | Popular Tags |