Object lookup(String key) throws ObjectNameNotFoundException
    {
        Object result = null;
        NamedEntry entry = localLookup(key);
        // can't find local bound object
        if(entry == null)
        {
            try
            {
                PersistenceBroker broker = tx.getBroker();
                // build Identity to lookup entry
                Identity oid = broker.serviceIdentity().buildIdentity(NamedEntry.class, key);
                entry = (NamedEntry) broker.getObjectByIdentity(oid);
            }
            catch(Exception e)
            {
                log.error("Can't materialize bound object for key '" + key + "'", e);
            }
        }
        if(entry == null)
        {
            log.info("No object found for key '" + key + "'");
        }
        else
        {
            Object obj = entry.getObject();
            // found a persistent capable object associated with that key
            if(obj instanceof Identity)
            {
                Identity objectIdentity = (Identity) obj;
                result = tx.getBroker().getObjectByIdentity(objectIdentity);
                // lock the persistance capable object
                RuntimeObject rt = new RuntimeObject(result, objectIdentity, tx, false);
                tx.lockAndRegister(rt, Transaction.READ, tx.getRegistrationList());
            }
            else
            {
                // nothing else to do
                result = obj;
            }
        }
        if(result == null) throw new ObjectNameNotFoundException("Can't find named object for name '" + key + "'");
        return result;
    }
Object lookup ( String key ) throws ObjectNameNotFoundException { Object result = null ; NamedEntry entry = localLookup ( key ) ; if ( entry == null ) { try { PersistenceBroker broker = tx . getBroker ( ) ; Identity oid = broker . serviceIdentity ( ) . buildIdentity ( NamedEntry . class , key ) ; entry = ( NamedEntry ) broker . getObjectByIdentity ( oid ) ; } catch ( Exception e ) { log . error ( "Can't materialize bound object for key '" + key + "'" , e ) ; } } if ( entry == null ) { log . info ( "No object found for key '" + key + "'" ) ; } else { Object obj = entry . getObject ( ) ; if ( obj instanceof Identity ) { Identity objectIdentity = ( Identity ) obj ; result = tx . getBroker ( ) . getObjectByIdentity ( objectIdentity ) ; RuntimeObject rt = new RuntimeObject ( result , objectIdentity , tx , false ) ; tx . lockAndRegister ( rt , Transaction . READ , tx . getRegistrationList ( ) ) ; } else { result = obj ; } } if ( result == null ) throw new ObjectNameNotFoundException ( "Can't find named object for name '" + key + "'" ) ; return result ; }
Return a named object associated with the specified key.