1 15 package org.apache.hivemind.lib.impl; 16 17 import java.rmi.RemoteException ; 18 19 import org.apache.hivemind.lib.NameLookup; 20 import org.apache.hivemind.lib.RemoteExceptionCoordinator; 21 22 28 public abstract class AbstractEJBProxy 29 { 30 private NameLookup _nameLookup; 31 private RemoteExceptionCoordinator _coordinator; 32 33 protected AbstractEJBProxy(NameLookup nameLookup, RemoteExceptionCoordinator coordinator) 34 { 35 _nameLookup = nameLookup; 36 _coordinator = coordinator; 37 } 38 39 protected Object _lookup(String name) 40 { 41 return _nameLookup.lookup(name, Object .class); 42 } 43 44 47 48 protected abstract void _clearCachedReferences(); 49 50 56 protected void _handleRemoteException(RemoteException ex) 57 { 58 _clearCachedReferences(); 59 _coordinator.fireRemoteExceptionDidOccur(this, ex); 60 } 61 } 62 | Popular Tags |