public synchronized Object [ ] allRemainingElements ( ) throws RemoteException , EnumeratorException { if ( ! hasMoreElementsR ( ) ) { throw new NoMoreElementsException ( ) ; } EJBObject [ ] remainder = null ; if ( ! exhausted ) { // We must fetch the remaining elements from the remote // result set try { //110799 remainder = vEnum . allRemainingElements ( ) ; } catch ( NoMoreElementsException ex ) { // FFDCFilter.processException(ex, CLASS_NAME + ".allRemainingElements", // "313", this); } catch ( java . rmi . NoSuchObjectException exc ) { // FFDCFilter.processException(exc, CLASS_NAME + ".allRemainingElements", // "319", this); throw new com . ibm . ejs . container . finder . CollectionCannotBeFurtherAccessedException ( "Cannot access finder result outside transaction" ) ; } //110799 finally { exhausted = true ; vEnum = null ; } } // Concatenate the unenumerated elements from our local cache // and the remaining elements from the remote result set. final int numCached = elements . length - index ; final int numRemaining = remainder != null ? remainder . length : 0 ; final EJBObject [ ] result = new EJBObject [ numCached + numRemaining ] ; System . arraycopy ( elements , index , result , 0 , numCached ) ; if ( remainder != null ) { System . arraycopy ( remainder , 0 , result , numCached , numRemaining ) ; } elements = null ; return result ; }
Obtain all of the remaining elements from the enumeration