/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
@Override void initialize(StateManagerImpl context, PCState previous) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); }
@Override void initialize(StateManagerImpl context, PCState previous) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); }
void initialize(StateManagerImpl context) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); } }
@Override void initialize(StateManagerImpl context, PCState previous) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); }
@Override void initialize(StateManagerImpl context, PCState previous) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); }
if (_news == null) _news = new HashMap<Object,StateManagerImpl>(); _news.put(sm.getId(), sm); return;
if (_news == null) _news = new HashMap<Object,StateManagerImpl>(); _news.put(sm.getId(), sm); return;
if (_news == null) _news = new HashMap<Object,StateManagerImpl>(); _news.put(sm.getId(), sm); return;
/** * Generate the detached state for the given instance. */ private static Object getDetachedState(StateManagerImpl sm, BitSet fields) { // if datastore, store id in first element int offset = (sm.getMetaData().getIdentityType() == ClassMetaData.ID_DATASTORE) ? 1 : 0; // make version state array one larger for new instances; marks new // instances without affecting serialization size much Object[] state; if (sm.isNew()) state = new Object[3 + offset]; else state = new Object[2 + offset]; if (offset > 0) { Object id; if (sm.isEmbedded() || sm.getObjectId() == null) id = sm.getId(); else id = sm.getObjectId(); state[0] = id.toString(); } state[offset] = sm.getVersion(); state[offset + 1] = fields; return state; }
/** * Generate the detached state for the given instance. */ private static Object getDetachedState(StateManagerImpl sm, BitSet fields) { // if datastore, store id in first element int offset = (sm.getMetaData().getIdentityType() == ClassMetaData.ID_DATASTORE) ? 1 : 0; // make version state array one larger for new instances; marks new // instances without affecting serialization size much Object[] state; if (sm.isNew()) state = new Object[3 + offset]; else state = new Object[2 + offset]; if (offset > 0) { Object id; if (sm.isEmbedded() || sm.getObjectId() == null) id = sm.getId(); else id = sm.getObjectId(); state[0] = id.toString(); } state[offset] = sm.getVersion(); state[offset + 1] = fields; return state; }
/** * Generate the detached state for the given instance. */ private static Object getDetachedState(StateManagerImpl sm, BitSet fields) { // if datastore, store id in first element int offset = (sm.getMetaData().getIdentityType() == ClassMetaData.ID_DATASTORE) ? 1 : 0; // make version state array one larger for new instances; marks new // instances without affecting serialization size much Object[] state; if (sm.isNew()) state = new Object[3 + offset]; else state = new Object[2 + offset]; if (offset > 0) { Object id; if (sm.isEmbedded() || sm.getObjectId() == null) id = sm.getId(); else id = sm.getObjectId(); state[0] = id.toString(); } state[offset] = sm.getVersion(); state[offset + 1] = fields; return state; }
/** * Generate the detached state for the given instance. */ private static Object getDetachedState(StateManagerImpl sm, BitSet fields) { // if datastore, store id in first element int offset = (sm.getMetaData().getIdentityType() == ClassMetaData.ID_DATASTORE) ? 1 : 0; // make version state array one larger for new instances; marks new // instances without affecting serialization size much Object[] state; if (sm.isNew()) state = new Object[3 + offset]; else state = new Object[2 + offset]; if (offset > 0) { Object id; if (sm.isEmbedded() || sm.getObjectId() == null) id = sm.getId(); else id = sm.getObjectId(); state[0] = id.toString(); } state[offset] = sm.getVersion(); state[offset + 1] = fields; return state; }
/** * Generate the detached state for the given instance. */ private static Object getDetachedState(StateManagerImpl sm, BitSet fields) { // if datastore, store id in first element int offset = (sm.getMetaData().getIdentityType() == ClassMetaData.ID_DATASTORE) ? 1 : 0; // make version state array one larger for new instances; marks new // instances without affecting serialization size much Object[] state; if (sm.isNew()) state = new Object[3 + offset]; else state = new Object[2 + offset]; if (offset > 0) { Object id; if (sm.isEmbedded() || sm.getObjectId() == null) id = sm.getId(); else id = sm.getObjectId(); state[0] = id.toString(); } state[offset] = sm.getVersion(); state[offset + 1] = fields; return state; }