public final ManagedObject getManagedObject ( ) throws ObjectManagerException { // final String methodName = "getManagedObject"; // if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) // trace.entry(this, // cclass, // methodName); // Get the object if is already in memory. ManagedObject managedObject = null ; if ( managedObjectReference != null ) managedObject = ( ManagedObject ) managedObjectReference . get ( ) ; if ( managedObject == null ) { // See if we can avoid synchronizing. synchronized ( this ) { if ( managedObjectReference != null ) managedObject = ( ManagedObject ) managedObjectReference . get ( ) ; if ( managedObject == null ) { managedObject = objectStore . get ( this ) ; if ( managedObject != null ) { managedObject . owningToken = this ; // PM22584 Set the owning token first managedObjectReference = new java . lang . ref . WeakReference ( managedObject ) ; } // if (managedObject != null). } // if (managedObject == null). } // synchronize (this). } // if (managedObject == null). // if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) // trace.exit(this, // cclass, // methodName, // new Object[] {managedObject}); return managedObject ; }
Find the ManagedObject handled by this token .