/** * clear all the internal collections, just * to help the garbage collector, does not * clear anything that is needed during the * afterTransactionCompletion() phase */ @Override protected void cleanupOnClose() { persistenceContext.clear(); }
private void internalClear() { persistenceContext.clear(); actionQueue.clear(); final ClearEvent event = new ClearEvent( this ); for ( ClearEventListener listener : listeners( EventType.CLEAR ) ) { listener.onClear( event ); } }
/** * clear all the internal collections, just * to help the garbage collector, does not * clear anything that is needed during the * afterTransactionCompletion() phase */ private void cleanup() { persistenceContext.clear(); }
/** * clear all the internal collections, just * to help the garbage collector, does not * clear anything that is needed during the * afterTransactionCompletion() phase */ private void cleanup() { persistenceContext.clear(); }
/** * clear all the internal collections, just * to help the garbage collector, does not * clear anything that is needed during the * afterTransactionCompletion() phase */ @Override protected void cleanupOnClose() { persistenceContext.clear(); }
public void clear() { errorIfClosed(); checkTransactionSynchStatus(); persistenceContext.clear(); actionQueue.clear(); }
public void clear() { errorIfClosed(); checkTransactionSynchStatus(); persistenceContext.clear(); actionQueue.clear(); }
private void replacePersistenceContext(StatefulPersistenceContext persistenceContextNew) { if ( persistenceContextNew.getSession() != null ) { throw new IllegalStateException( "new persistence context is already connected to a session " ); } persistenceContext.clear(); ObjectInputStream ois = null; try { ois = new ObjectInputStream( new ByteArrayInputStream( serializePersistenceContext( persistenceContextNew ) ) ); this.persistenceContext = StatefulPersistenceContext.deserialize( ois, this ); } catch (IOException ex) { throw new SerializationException( "could not deserialize the persistence context", ex ); } catch (ClassNotFoundException ex) { throw new SerializationException( "could not deserialize the persistence context", ex ); } finally { try { if (ois != null) ois.close(); } catch (IOException ignore) { } } }
private void replacePersistenceContext(StatefulPersistenceContext persistenceContextNew) { if ( persistenceContextNew.getSession() != null ) { throw new IllegalStateException( "new persistence context is already connected to a session " ); } persistenceContext.clear(); ObjectInputStream ois = null; try { ois = new ObjectInputStream( new ByteArrayInputStream( serializePersistenceContext( persistenceContextNew ) ) ); this.persistenceContext = StatefulPersistenceContext.deserialize( ois, this ); } catch (IOException ex) { throw new SerializationException( "could not deserialize the persistence context", ex ); } catch (ClassNotFoundException ex) { throw new SerializationException( "could not deserialize the persistence context", ex ); } finally { try { if (ois != null) ois.close(); } catch (IOException ignore) { } } }
private void internalClear() { persistenceContext.clear(); actionQueue.clear(); final ClearEvent event = new ClearEvent( this ); for ( ClearEventListener listener : listeners( EventType.CLEAR ) ) { listener.onClear( event ); } }