1 45 package org.openejb.core.ivm.naming; 46 47 import javax.naming.NameNotFoundException ; 48 49 import org.openejb.core.ThreadContext; 50 51 59 public abstract class ENCReference implements Reference{ 60 61 protected Reference ref = null; 62 protected boolean checking = true; 63 64 66 public ENCReference(Reference ref){ 67 this.ref = ref; 68 } 69 70 public void setChecking( boolean value ) { 71 checking = value; 72 } 73 74 77 public Object getObject( ) throws javax.naming.NamingException { 78 if( ThreadContext.isValid() ){ 79 ThreadContext cntx = ThreadContext.getThreadContext(); 80 byte operation = cntx.getCurrentOperation(); 81 checkOperation(operation); 82 } 83 return ref.getObject(); 84 } 85 86 public abstract void checkOperation(byte opertionType) throws NameNotFoundException ; 87 } 88 | Popular Tags |