You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pc...@apache.org on 2006/07/19 23:35:07 UTC
svn commit: r423615 [39/44] - in /incubator/openjpa/trunk: ./
openjpa-jdbc-5/ openjpa-jdbc-5/src/ openjpa-jdbc-5/src/main/
openjpa-jdbc-5/src/main/java/ openjpa-jdbc-5/src/main/java/org/
openjpa-jdbc-5/src/main/java/org/apache/ openjpa-jdbc-5/src/main/...
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java Wed Jul 19 14:34:44 2006
@@ -582,8 +582,7 @@
beginOperation(false);
try {
return (_userObjects == null) ? null : _userObjects.get(key);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -597,8 +596,7 @@
if (_userObjects == null)
_userObjects = new HashMap();
return _userObjects.put(key, val);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -611,8 +609,7 @@
beginOperation(false);
try {
_lifeEventManager.addListener(listener, classes);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -621,8 +618,7 @@
beginOperation(false);
try {
_lifeEventManager.removeListener(listener);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -673,8 +669,7 @@
_transEventManager.addListener(tl);
if (tl instanceof RemoteCommitEventManager)
_flags |= FLAG_REMOTE_LISTENER;
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -686,8 +681,7 @@
&& _transEventManager.removeListener(tl)
&& (tl instanceof RemoteCommitEventManager))
_flags &= ~FLAG_REMOTE_LISTENER;
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -748,8 +742,7 @@
loaded = sm.load(fetchState,
StateManagerImpl.LOAD_FGS, exclude, edata,
false);
- }
- catch (ObjectNotFoundException onfe) {
+ } catch (ObjectNotFoundException onfe) {
if ((flags & OID_NODELETED) != 0
|| (flags & OID_NOVALIDATE) != 0)
throw onfe;
@@ -803,8 +796,7 @@
try {
sm.load(fetchState, StateManagerImpl.LOAD_FGS, exclude,
edata, false);
- }
- catch (ObjectNotFoundException onfe) {
+ } catch (ObjectNotFoundException onfe) {
if ((flags & OID_NODELETED) != 0
|| (flags & OID_NOVALIDATE) != 0)
throw onfe;
@@ -812,14 +804,11 @@
}
}
return call.processReturn(oid, sm);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -841,8 +830,7 @@
try {
if (!_store.initialize(sm, state, fetchState, edata))
return null;
- }
- finally {
+ } finally {
sm.setLoading(false);
}
}
@@ -966,14 +954,11 @@
results[idx] = call.processReturn(oid, sm);
}
return results;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
_loading = null;
endOperation();
}
@@ -1017,8 +1002,7 @@
try {
StateManagerImpl sm = getStateManagerImplById(oid, true);
return call.processReturn(oid, sm);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1038,14 +1022,11 @@
return meta.getObjectIdType();
return _store.getDataStoreIdType(meta);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1089,18 +1070,14 @@
Object[] arr = (val instanceof Object[]) ? (Object[]) val
: new Object[]{ val };
return ApplicationIds.fromPKValues(arr, meta);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (ClassCastException cce) {
+ } catch (ClassCastException cce) {
throw new UserException(_loc.get("bad-id-value", val,
val.getClass().getName(), cls)).setCause(cce);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1160,8 +1137,7 @@
throw new InvalidStateException(_loc.get("active"));
_factory.syncWithManagedTransaction(this, true);
beginInternal();
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1186,14 +1162,12 @@
&& _transEventManager.hasBeginListeners())
_transEventManager.fireEvent(new TransactionEvent(this,
TransactionEvent.AFTER_BEGIN, null, null, null, null));
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
// if we already started the transaction, don't let it commit
if ((_flags & FLAG_ACTIVE) != 0)
setRollbackOnlyInternal();
throw ke.setFatal(true);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
// if we already started the transaction, don't let it commit
if ((_flags & FLAG_ACTIVE) != 0)
setRollbackOnlyInternal();
@@ -1218,14 +1192,11 @@
assertTransactionOperation();
if ((_flags & FLAG_STORE_ACTIVE) == 0)
beginStoreManagerTransaction(false);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new StoreException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1275,16 +1246,14 @@
}
}
err = re;
- }
- finally {
+ } finally {
_flags &= ~FLAG_STORE_ACTIVE;
}
if (releaseConn) {
try {
releaseConnection();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
if (err == null)
err = re;
}
@@ -1308,18 +1277,15 @@
// this commit on the transaction will cause our
// beforeCompletion method to be invoked
trans.commit();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), ke);
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), e);
throw new StoreException(e);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1333,18 +1299,15 @@
_runtime.getTransactionManager().getTransaction();
if (trans != null)
trans.rollback();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), ke);
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), e);
throw new StoreException(e);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1362,8 +1325,7 @@
return true;
}
return false;
- }
- finally {
+ } finally {
unlock();
}
}
@@ -1384,8 +1346,7 @@
else
rollback();
begin();
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1401,14 +1362,11 @@
if (trans == null)
return false;
return trans.getStatus() == Status.STATUS_MARKED_ROLLBACK;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1418,8 +1376,7 @@
try {
assertTransactionOperation();
setRollbackOnlyInternal();
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1434,11 +1391,9 @@
if (trans == null)
throw new InvalidStateException(_loc.get("null-trans"));
trans.setRollbackOnly();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
}
}
@@ -1468,14 +1423,11 @@
}
}
_savepoints.put(name, save);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1487,8 +1439,7 @@
throw new UserException(_loc.get("no-lastsavepoint"));
releaseSavepoint((String) _savepoints.get
(_savepoints.size() - 1));
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1515,14 +1466,11 @@
save.release(true);
if (_savepointCache != null)
_savepointCache.clear();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1534,8 +1482,7 @@
throw new UserException(_loc.get("no-lastsavepoint"));
rollbackToSavepoint((String) _savepoints.get
(_savepoints.size() - 1));
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1598,11 +1545,9 @@
}
catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1629,13 +1574,11 @@
try {
flushSafe(FLUSH_INC);
_flags |= FLAG_FLUSHED;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
// rollback on flush error; objects may be in inconsistent state
setRollbackOnly();
throw ke.setFatal(true);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
// rollback on flush error; objects may be in inconsistent state
setRollbackOnly();
throw new StoreException(re).setFatal(true);
@@ -1651,8 +1594,7 @@
try {
if ((_flags & FLAG_ACTIVE) != 0)
flushSafe(FLUSH_LOGICAL);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1675,11 +1617,9 @@
try {
flushSafe(FLUSH_ROLLBACK);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new StoreException(re);
}
}
@@ -1692,8 +1632,7 @@
beginOperation(true);
try {
return (_flags & FLAG_ACTIVE) != 0;
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1704,8 +1643,7 @@
beginOperation(true);
try {
return (_flags & FLAG_STORE_ACTIVE) != 0;
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1719,12 +1657,10 @@
&& (_flags & FLAG_ACTIVE) == 0)
syncWithManagedTransaction();
return _operationCount++ == 1;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
unlock();
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
unlock();
throw new GeneralException(re);
}
@@ -1743,14 +1679,11 @@
if (_operationCount < 1)
throw new InternalException();
return _operationCount == 1;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
_operationCount--;
if (_operationCount == 0)
_operating.clear();
@@ -1779,18 +1712,15 @@
_sync.beforeCompletion();
flushSafe(FLUSH_COMMIT);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), ke);
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), re);
throw new StoreException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -1813,18 +1743,15 @@
if ((_flags & FLAG_CLOSE_INVOKED) != 0
&& _compat.getCloseOnManagedCommit())
free();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), ke);
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
if (_log.isTraceEnabled())
_log.trace(_loc.get("end-trans-error"), re);
throw new StoreException(re);
- }
- finally {
+ } finally {
_flags &= ~FLAG_ACTIVE;
_flags &= ~FLAG_FLUSHED;
@@ -1851,8 +1778,7 @@
_flags |= FLAG_FLUSHING;
try {
flush(reason);
- }
- finally {
+ } finally {
_flags &= ~FLAG_FLUSHING;
}
}
@@ -2122,8 +2048,7 @@
try {
exceps = add(exceps, endStoreManagerTransaction(rollback));
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
rollback = true;
exceps = add(exceps, re);
}
@@ -2186,8 +2111,7 @@
sm.rollback();
} else
sm.commit();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
exceps = add(exceps, re);
}
}
@@ -2237,13 +2161,11 @@
for (Iterator itr = objs.iterator(); itr.hasNext();) {
try {
persist(itr.next(), call);
- }
- catch (UserException ue) {
+ } catch (UserException ue) {
exceps = add(exceps, ue);
}
}
- }
- finally {
+ } finally {
endOperation();
}
throwNestedExceptions(exceps, false);
@@ -2381,14 +2303,11 @@
if ((action & OpCallbacks.ACT_CASCADE) != 0)
sm.cascadePersist(call);
return sm;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2442,14 +2361,12 @@
obj = itr.next();
if (obj != null)
delete(obj, getStateManagerImpl(obj, true), call);
- }
- catch (UserException ue) {
+ } catch (UserException ue) {
exceps = add(exceps, ue);
}
}
throwNestedExceptions(exceps, false);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2462,14 +2379,11 @@
try {
assertWriteOperation();
delete(obj, getStateManagerImpl(obj, true), call);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2522,14 +2436,12 @@
for (Iterator itr = objs.iterator(); itr.hasNext();) {
try {
release(itr.next(), call);
- }
- catch (UserException ue) {
+ } catch (UserException ue) {
exceps = add(exceps, ue);
}
}
throwNestedExceptions(exceps, false);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2554,11 +2466,9 @@
}
catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2619,8 +2529,7 @@
copy.pcCopyFields(pc, fields);
state = PCState.ECOPY;
copy.pcReplaceStateManager(null);
- }
- finally {
+ } finally {
// if the instance didn't have a state manager to start,
// revert it to being transient
if (orig == null)
@@ -2637,14 +2546,11 @@
sm.initialize(copy, state);
return sm;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2674,8 +2580,7 @@
sm.initialize(sm.getMetaData().getDescribedType(), state);
}
return sm;
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2696,8 +2601,7 @@
refreshInternal(_operating.iterator().next(), call);
else
refreshInternal(_operating, call);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2717,8 +2621,7 @@
refreshInternal(_operating.iterator().next(), call);
else
refreshInternal(_operating, call);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -2777,8 +2680,7 @@
} else if (assertPersistenceCapable(obj).pcIsDetached()
== Boolean.TRUE)
throw newDetachedException(obj, "refresh");
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
exceps = add(exceps, ke);
}
}
@@ -2801,8 +2703,7 @@
sm.afterRefresh();
sm.load(_fc.newFetchState(),
StateManagerImpl.LOAD_FGS, null, null, false);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
exceps = add(exceps, ke);
}
}
@@ -2815,16 +2716,13 @@
if (sm != null && !sm.isDetached())
fireLifecycleEvent(sm.getManagedInstance(), null,
sm.getMetaData(), LifecycleEvent.AFTER_REFRESH);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
exceps = add(exceps, ke);
}
}
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
}
throwNestedExceptions(exceps, false);
@@ -2853,11 +2751,9 @@
} else if (assertPersistenceCapable(obj).pcIsDetached()
== Boolean.TRUE)
throw newDetachedException(obj, "refresh");
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
}
}
@@ -2907,8 +2803,7 @@
} else if (assertPersistenceCapable(obj).pcIsDetached()
== Boolean.TRUE)
throw newDetachedException(obj, "retrieve");
- }
- catch (UserException ue) {
+ } catch (UserException ue) {
exceps = add(exceps, ue);
}
}
@@ -2935,19 +2830,15 @@
try {
sm.beforeRead(-1);
sm.load(_fc.newFetchState(), mode, null, null, false);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
exceps = add(exceps, ke);
}
}
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
throwNestedExceptions(exceps, false);
@@ -2979,14 +2870,11 @@
} else if (assertPersistenceCapable(obj).pcIsDetached()
== Boolean.TRUE)
throw newDetachedException(obj, "retrieve");
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3015,13 +2903,11 @@
for (Iterator itr = objs.iterator(); itr.hasNext();) {
try {
evict(itr.next(), call);
- }
- catch (UserException ue) {
+ } catch (UserException ue) {
exceps = add(exceps, ue);
}
}
- }
- finally {
+ } finally {
endOperation();
}
throwNestedExceptions(exceps, false);
@@ -3047,8 +2933,7 @@
evict(sm.getManagedInstance(), call);
}
}
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3075,11 +2960,9 @@
}
catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3093,14 +2976,11 @@
beginOperation(true);
try {
return new DetachManager(this, false, call).detach(obj);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3116,14 +2996,11 @@
beginOperation(true);
try {
return new DetachManager(this, false, call).detachAll(objs);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3134,14 +3011,11 @@
if ((_flags & FLAG_FLUSH_REQUIRED) != 0)
flush();
detachAllInternal(call);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3178,15 +3052,12 @@
assertWriteOperation();
try {
return new AttachManager(this, copyNew, call).attach(obj);
- }
- catch (OptimisticException oe) {
+ } catch (OptimisticException oe) {
setRollbackOnly();
throw oe.setFatal(true);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
}
}
@@ -3208,15 +3079,12 @@
assertWriteOperation();
try {
return new AttachManager(this, copyNew, call).attachAll(objs);
- }
- catch (OptimisticException oe) {
+ } catch (OptimisticException oe) {
setRollbackOnly();
throw oe.setFatal(true);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
}
}
@@ -3232,14 +3100,12 @@
for (Iterator itr = objs.iterator(); itr.hasNext();) {
try {
nontransactional(itr.next(), call);
- }
- catch (UserException ue) {
+ } catch (UserException ue) {
exceps = add(exceps, ue);
}
}
throwNestedExceptions(exceps, false);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3256,14 +3122,11 @@
return;
if (sm != null)
sm.nontransactional();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3341,14 +3204,11 @@
}
transactionalStatesAll(sms, failed, exceps);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3389,11 +3249,9 @@
}
catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3414,8 +3272,7 @@
sm.transactional();
sm.load(_fc.newFetchState(), StateManagerImpl.LOAD_FGS, null,
null, false);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
exceps = add(exceps, ke);
}
}
@@ -3440,14 +3297,11 @@
_extents.add(extent);
return extent;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3494,14 +3348,11 @@
_queries = new ReferenceHashSet(ReferenceHashSet.WEAK);
_queries.add(q);
return q;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3569,8 +3420,7 @@
beginOperation(true); // have to sync or lock level always NONE
try {
lock(obj, _fc.getWriteLockLevel(), _fc.getLockTimeout(), call);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3592,14 +3442,11 @@
_lm.lock(sm, level, timeout, null);
sm.readLocked(level, level); // use same level for future write
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3612,8 +3459,7 @@
try {
lockAll(objs, _fc.getWriteLockLevel(), _fc.getLockTimeout(),
call);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3650,14 +3496,11 @@
_lm.lockAll(sms, level, timeout, null);
for (Iterator itr = sms.iterator(); itr.hasNext();)
((StateManagerImpl) itr.next()).readLocked(level, level);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3679,11 +3522,9 @@
if ((_flags & FLAG_STORE_FLUSHING) != 0)
setRollbackOnlyInternal();
return _store.cancelAll();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new StoreException(re);
}
}
@@ -3730,8 +3571,7 @@
beginOperation(false);
try {
return new ManagedObjectCollection(getManagedStates());
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3740,8 +3580,7 @@
beginOperation(false);
try {
return new ManagedObjectCollection(getTransactionalStates());
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3751,8 +3590,7 @@
try {
return new ManagedObjectCollection
(getPendingTransactionalStates());
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3761,8 +3599,7 @@
beginOperation(false);
try {
return new ManagedObjectCollection(getDirtyStates());
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -3862,8 +3699,7 @@
if (_transCache == null)
_transCache = new TransactionalCache(_orderDirty);
_transCache.addClean(sm);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -3879,8 +3715,7 @@
_transCache.remove(sm);
if (_derefCache != null && !sm.isPersistent())
_derefCache.remove(sm);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -3949,8 +3784,7 @@
if (_pending == null)
_pending = new HashSet();
_pending.add(sm);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -3966,8 +3800,7 @@
_pending.remove(sm);
if (_derefCache != null && !sm.isPersistent())
_derefCache.remove(sm);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -4011,8 +3844,7 @@
Exceptions.toString(sm.getManagedInstance()))).
setFailedObject(sm.getManagedInstance()).
setFatal(true);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -4026,8 +3858,7 @@
if (_updatedClss == null)
_updatedClss = new HashSet();
_updatedClss.add(cls);
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -4071,8 +3902,7 @@
if ((_flags & FLAG_ACTIVE) == 0)
free();
- }
- finally {
+ } finally {
endOperation();
}
}
@@ -4085,8 +3915,7 @@
if ((_autoDetach & DETACH_CLOSE) != 0) {
try {
detachAllInternal(_call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
err = re;
}
}
@@ -4117,8 +3946,7 @@
for (Iterator itr = _queries.iterator(); itr.hasNext();) {
try {
((Query) itr.next()).closeResources();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
}
}
_queries = null;
@@ -4180,8 +4008,7 @@
if (!PCRegistry.isRegistered(cls)) {
try {
Class.forName(cls.getName(), true, cls.getClassLoader());
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
}
}
return PCRegistry.newInstance(cls, null, false);
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java Wed Jul 19 14:34:44 2006
@@ -111,8 +111,7 @@
public OpenJPAConfiguration getConfiguration() {
try {
return _broker.getConfiguration();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -120,8 +119,7 @@
public FetchConfiguration getFetchConfiguration() {
try {
return _broker.getFetchConfiguration();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -129,8 +127,7 @@
public ClassLoader getClassLoader() {
try {
return _broker.getClassLoader();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -138,8 +135,7 @@
public LockManager getLockManager() {
try {
return _broker.getLockManager();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -147,8 +143,7 @@
public DelegatingStoreManager getStoreManager() {
try {
return _broker.getStoreManager();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -156,8 +151,7 @@
public String getConnectionUserName() {
try {
return _broker.getConnectionUserName();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -165,8 +159,7 @@
public String getConnectionPassword() {
try {
return _broker.getConnectionPassword();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -174,8 +167,7 @@
public Object find(Object oid, boolean validate, FindCallbacks call) {
try {
return _broker.find(oid, validate, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -184,8 +176,7 @@
FindCallbacks call) {
try {
return _broker.findAll(oids, validate, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -193,8 +184,7 @@
public Object findCached(Object oid, FindCallbacks call) {
try {
return _broker.findCached(oid, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -203,8 +193,7 @@
Object edata, int flags) {
try {
return _broker.find(oid, fetchState, exclude, edata, flags);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -213,8 +202,7 @@
BitSet exclude, Object edata, int flags) {
try {
return _broker.findAll(oids, fetchState, exclude, edata, flags);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -223,8 +211,7 @@
FetchConfiguration fetch, boolean ignoreChanges) {
try {
return _broker.extentIterator(cls, subs, fetch, ignoreChanges);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -232,8 +219,7 @@
public void retrieve(Object obj, boolean fgOnly, OpCallbacks call) {
try {
_broker.retrieve(obj, fgOnly, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -241,8 +227,7 @@
public void retrieveAll(Collection objs, boolean fgOnly, OpCallbacks call) {
try {
_broker.retrieveAll(objs, fgOnly, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -251,8 +236,7 @@
OpenJPAStateManager owner, ValueMetaData ownerMeta) {
try {
return _broker.embed(obj, id, owner, ownerMeta);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -260,8 +244,7 @@
public Class getObjectIdType(Class cls) {
try {
return _broker.getObjectIdType(cls);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -269,8 +252,7 @@
public Object newObjectId(Class cls, Object val) {
try {
return _broker.newObjectId(cls, val);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -278,8 +260,7 @@
public Collection getManagedObjects() {
try {
return _broker.getManagedObjects();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -287,8 +268,7 @@
public Collection getTransactionalObjects() {
try {
return _broker.getTransactionalObjects();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -296,8 +276,7 @@
public Collection getPendingTransactionalObjects() {
try {
return _broker.getPendingTransactionalObjects();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -305,8 +284,7 @@
public Collection getDirtyObjects() {
try {
return _broker.getDirtyObjects();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -314,8 +292,7 @@
public boolean getOrderDirtyObjects() {
try {
return _broker.getOrderDirtyObjects();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -323,8 +300,7 @@
public void setOrderDirtyObjects(boolean order) {
try {
_broker.setOrderDirtyObjects(order);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -332,8 +308,7 @@
public Collection getPersistedTypes() {
try {
return _broker.getPersistedTypes();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -341,8 +316,7 @@
public Collection getUpdatedTypes() {
try {
return _broker.getUpdatedTypes();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -350,8 +324,7 @@
public Collection getDeletedTypes() {
try {
return _broker.getDeletedTypes();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -359,8 +332,7 @@
public OpenJPAStateManager getStateManager(Object obj) {
try {
return _broker.getStateManager(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -368,8 +340,7 @@
public int getLockLevel(Object obj) {
try {
return _broker.getLockLevel(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -377,8 +348,7 @@
public Object getVersion(Object obj) {
try {
return _broker.getVersion(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -386,8 +356,7 @@
public boolean isDirty(Object obj) {
try {
return _broker.isDirty(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -395,8 +364,7 @@
public boolean isTransactional(Object obj) {
try {
return _broker.isTransactional(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -404,8 +372,7 @@
public boolean isPersistent(Object obj) {
try {
return _broker.isPersistent(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -413,8 +380,7 @@
public boolean isNew(Object obj) {
try {
return _broker.isNew(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -422,8 +388,7 @@
public boolean isDeleted(Object obj) {
try {
return _broker.isDeleted(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -431,8 +396,7 @@
public Object getObjectId(Object obj) {
try {
return _broker.getObjectId(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -440,8 +404,7 @@
public boolean isManaged() {
try {
return _broker.isManaged();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -449,8 +412,7 @@
public boolean isActive() {
try {
return _broker.isActive();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -458,8 +420,7 @@
public boolean isStoreActive() {
try {
return _broker.isStoreActive();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -467,8 +428,7 @@
public boolean hasConnection() {
try {
return _broker.hasConnection();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -476,8 +436,7 @@
public Object getConnection() {
try {
return _broker.getConnection();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -485,8 +444,7 @@
public void lock() {
try {
_broker.lock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -494,8 +452,7 @@
public void unlock() {
try {
_broker.unlock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -503,8 +460,7 @@
public boolean beginOperation(boolean read) {
try {
return _broker.beginOperation(read);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -512,8 +468,7 @@
public boolean endOperation() {
try {
return _broker.endOperation();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -522,8 +477,7 @@
RuntimeExceptionTranslator ex) {
try {
_broker.setImplicitBehavior(call, ex);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -531,8 +485,7 @@
public BrokerFactory getBrokerFactory() {
try {
return _broker.getBrokerFactory();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -540,8 +493,7 @@
public int getConnectionRetainMode() {
try {
return _broker.getConnectionRetainMode();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -549,8 +501,7 @@
public ManagedRuntime getManagedRuntime() {
try {
return _broker.getManagedRuntime();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -558,8 +509,7 @@
public InverseManager getInverseManager() {
try {
return _broker.getInverseManager();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -567,8 +517,7 @@
public boolean getMultithreaded() {
try {
return _broker.getMultithreaded();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -576,8 +525,7 @@
public void setMultithreaded(boolean multi) {
try {
_broker.setMultithreaded(multi);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -585,8 +533,7 @@
public boolean getIgnoreChanges() {
try {
return _broker.getIgnoreChanges();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -594,8 +541,7 @@
public void setIgnoreChanges(boolean ignore) {
try {
_broker.setIgnoreChanges(ignore);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -603,8 +549,7 @@
public boolean getNontransactionalRead() {
try {
return _broker.getNontransactionalRead();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -612,8 +557,7 @@
public void setNontransactionalRead(boolean read) {
try {
_broker.setNontransactionalRead(read);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -621,8 +565,7 @@
public boolean getNontransactionalWrite() {
try {
return _broker.getNontransactionalWrite();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -630,8 +573,7 @@
public void setNontransactionalWrite(boolean write) {
try {
_broker.setNontransactionalWrite(write);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -639,8 +581,7 @@
public int getRestoreState() {
try {
return _broker.getRestoreState();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -648,8 +589,7 @@
public void setRestoreState(int restore) {
try {
_broker.setRestoreState(restore);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -657,8 +597,7 @@
public boolean getOptimistic() {
try {
return _broker.getOptimistic();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -666,8 +605,7 @@
public void setOptimistic(boolean opt) {
try {
_broker.setOptimistic(opt);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -675,8 +613,7 @@
public boolean getRetainState() {
try {
return _broker.getRetainState();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -684,8 +621,7 @@
public void setRetainState(boolean retain) {
try {
_broker.setRetainState(retain);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -693,8 +629,7 @@
public int getAutoClear() {
try {
return _broker.getAutoClear();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -702,8 +637,7 @@
public void setAutoClear(int clear) {
try {
_broker.setAutoClear(clear);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -711,8 +645,7 @@
public int getAutoDetach() {
try {
return _broker.getAutoDetach();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -720,8 +653,7 @@
public void setAutoDetach(int flags) {
try {
_broker.setAutoDetach(flags);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -729,8 +661,7 @@
public void setAutoDetach(int flag, boolean on) {
try {
_broker.setAutoDetach(flag, on);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -738,8 +669,7 @@
public int getDetachState() {
try {
return _broker.getDetachState();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -747,8 +677,7 @@
public void setDetachState(int mode) {
try {
_broker.setDetachState(mode);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -756,8 +685,7 @@
public boolean isDetachedNew() {
try {
return _broker.isDetachedNew();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -765,8 +693,7 @@
public void setDetachedNew(boolean isNew) {
try {
_broker.setDetachedNew(isNew);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -774,8 +701,7 @@
public boolean getSyncWithManagedTransactions() {
try {
return _broker.getSyncWithManagedTransactions();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -783,8 +709,7 @@
public void setSyncWithManagedTransactions(boolean sync) {
try {
_broker.setSyncWithManagedTransactions(sync);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -792,8 +717,7 @@
public boolean getEvictFromDataCache() {
try {
return _broker.getEvictFromDataCache();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -801,8 +725,7 @@
public void setEvictFromDataCache(boolean evict) {
try {
_broker.setEvictFromDataCache(evict);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -810,8 +733,7 @@
public boolean getPopulateDataCache() {
try {
return _broker.getPopulateDataCache();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -819,8 +741,7 @@
public void setPopulateDataCache(boolean cache) {
try {
_broker.setPopulateDataCache(cache);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -828,8 +749,7 @@
public boolean isLargeTransaction() {
try {
return _broker.isLargeTransaction();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -837,8 +757,7 @@
public void setLargeTransaction(boolean largeTransaction) {
try {
_broker.setLargeTransaction(largeTransaction);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -846,8 +765,7 @@
public Object putUserObject(Object key, Object val) {
try {
return _broker.putUserObject(key, val);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -855,8 +773,7 @@
public Object getUserObject(Object key) {
try {
return _broker.getUserObject(key);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -864,8 +781,7 @@
public void addTransactionListener(Object listener) {
try {
_broker.addTransactionListener(listener);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -873,8 +789,7 @@
public void removeTransactionListener(Object listener) {
try {
_broker.removeTransactionListener(listener);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -882,8 +797,7 @@
public void addLifecycleListener(Object listener, Class[] classes) {
try {
_broker.addLifecycleListener(listener, classes);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -891,8 +805,7 @@
public void removeLifecycleListener(Object listener) {
try {
_broker.removeLifecycleListener(listener);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -900,8 +813,7 @@
public LifecycleEventManager getLifecycleEventManager() {
try {
return _broker.getLifecycleEventManager();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -909,8 +821,7 @@
public void begin() {
try {
_broker.begin();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -918,8 +829,7 @@
public void commit() {
try {
_broker.commit();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -927,8 +837,7 @@
public void rollback() {
try {
_broker.rollback();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -936,8 +845,7 @@
public boolean syncWithManagedTransaction() {
try {
return _broker.syncWithManagedTransaction();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -945,8 +853,7 @@
public void commitAndResume() {
try {
_broker.commitAndResume();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -954,8 +861,7 @@
public void rollbackAndResume() {
try {
_broker.rollbackAndResume();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -963,8 +869,7 @@
public void setRollbackOnly() {
try {
_broker.setRollbackOnly();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -972,8 +877,7 @@
public boolean getRollbackOnly() {
try {
return _broker.getRollbackOnly();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -981,8 +885,7 @@
public void setSavepoint(String name) {
try {
_broker.setSavepoint(name);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -990,8 +893,7 @@
public void rollbackToSavepoint() {
try {
_broker.rollbackToSavepoint();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -999,8 +901,7 @@
public void rollbackToSavepoint(String name) {
try {
_broker.rollbackToSavepoint(name);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1008,8 +909,7 @@
public void releaseSavepoint() {
try {
_broker.releaseSavepoint();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1017,8 +917,7 @@
public void releaseSavepoint(String name) {
try {
_broker.releaseSavepoint(name);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1026,8 +925,7 @@
public void flush() {
try {
_broker.flush();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1035,8 +933,7 @@
public void preFlush() {
try {
_broker.preFlush();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1044,8 +941,7 @@
public void validateChanges() {
try {
_broker.validateChanges();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1053,8 +949,7 @@
public void beginStore() {
try {
_broker.beginStore();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1062,8 +957,7 @@
public void persist(Object obj, OpCallbacks call) {
try {
_broker.persist(obj, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1071,8 +965,7 @@
public void persistAll(Collection objs, OpCallbacks call) {
try {
_broker.persistAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1081,8 +974,7 @@
OpCallbacks call) {
try {
return _broker.persist(obj, id, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1090,8 +982,7 @@
public void delete(Object obj, OpCallbacks call) {
try {
_broker.delete(obj, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1099,8 +990,7 @@
public void deleteAll(Collection objs, OpCallbacks call) {
try {
_broker.deleteAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1108,8 +998,7 @@
public void release(Object obj, OpCallbacks call) {
try {
_broker.release(obj, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1117,8 +1006,7 @@
public void releaseAll(Collection objs, OpCallbacks call) {
try {
_broker.releaseAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1126,8 +1014,7 @@
public void refresh(Object obj, OpCallbacks call) {
try {
_broker.refresh(obj, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1135,8 +1022,7 @@
public void refreshAll(Collection objs, OpCallbacks call) {
try {
_broker.refreshAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1144,8 +1030,7 @@
public void evict(Object obj, OpCallbacks call) {
try {
_broker.evict(obj, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1153,8 +1038,7 @@
public void evictAll(Collection objs, OpCallbacks call) {
try {
_broker.evictAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1162,8 +1046,7 @@
public void evictAll(OpCallbacks call) {
try {
_broker.evictAll(call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1171,8 +1054,7 @@
public void evictAll(Extent extent, OpCallbacks call) {
try {
_broker.evictAll(extent, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1180,8 +1062,7 @@
public Object detach(Object obj, OpCallbacks call) {
try {
return _broker.detach(obj, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1189,8 +1070,7 @@
public Object[] detachAll(Collection objs, OpCallbacks call) {
try {
return _broker.detachAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1198,8 +1078,7 @@
public void detachAll(OpCallbacks call) {
try {
_broker.detachAll(call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1207,8 +1086,7 @@
public Object attach(Object obj, boolean copyNew, OpCallbacks call) {
try {
return _broker.attach(obj, copyNew, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1217,8 +1095,7 @@
OpCallbacks call) {
try {
return _broker.attachAll(objs, copyNew, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1227,8 +1104,7 @@
call) {
try {
_broker.transactional(pc, updateVersion, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1237,8 +1113,7 @@
OpCallbacks call) {
try {
_broker.transactionalAll(objs, updateVersion, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1246,8 +1121,7 @@
public void nontransactional(Object pc, OpCallbacks call) {
try {
_broker.nontransactional(pc, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1255,8 +1129,7 @@
public void nontransactionalAll(Collection objs, OpCallbacks call) {
try {
_broker.nontransactionalAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1264,8 +1137,7 @@
public Extent newExtent(Class cls, boolean subs) {
try {
return _broker.newExtent(cls, subs);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1273,8 +1145,7 @@
public Query newQuery(String language, Class cls, Object query) {
try {
return _broker.newQuery(language, cls, query);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1282,8 +1153,7 @@
public Query newQuery(String language, Object query) {
try {
return _broker.newQuery(language, query);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1291,8 +1161,7 @@
public Seq getIdentitySequence(ClassMetaData meta) {
try {
return _broker.getIdentitySequence(meta);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1300,8 +1169,7 @@
public Seq getValueSequence(FieldMetaData fmd) {
try {
return _broker.getValueSequence(fmd);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1309,8 +1177,7 @@
public void lock(Object obj, int level, int timeout, OpCallbacks call) {
try {
_broker.lock(obj, level, timeout, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1318,8 +1185,7 @@
public void lock(Object obj, OpCallbacks call) {
try {
_broker.lock(obj, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1328,8 +1194,7 @@
OpCallbacks call) {
try {
_broker.lockAll(objs, level, timeout, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1337,8 +1202,7 @@
public void lockAll(Collection objs, OpCallbacks call) {
try {
_broker.lockAll(objs, call);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1346,8 +1210,7 @@
public boolean cancelAll() {
try {
return _broker.cancelAll();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1355,8 +1218,7 @@
public void dirtyType(Class cls) {
try {
_broker.dirtyType(cls);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1364,8 +1226,7 @@
public void close() {
try {
_broker.close();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1373,8 +1234,7 @@
public boolean isClosed() {
try {
return _broker.isClosed();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1382,8 +1242,7 @@
public void assertOpen() {
try {
_broker.assertOpen();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1391,8 +1250,7 @@
public void assertActiveTransaction() {
try {
_broker.assertActiveTransaction();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1400,8 +1258,7 @@
public void assertNontransactionalRead() {
try {
_broker.assertNontransactionalRead();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1409,8 +1266,7 @@
public void assertWriteOperation() {
try {
_broker.assertWriteOperation();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1422,8 +1278,7 @@
public void beforeCompletion() {
try {
_broker.beforeCompletion();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1431,8 +1286,7 @@
public void afterCompletion(int status) {
try {
_broker.afterCompletion(status);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1445,8 +1299,7 @@
throws ResourceException {
try {
return _broker.getMetaData();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1455,8 +1308,7 @@
throws ResourceException {
try {
return _broker.createInteraction();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1470,8 +1322,7 @@
throws ResourceException {
try {
return _broker.getResultSetInfo();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1479,8 +1330,7 @@
public Object newInstance(Class cls) {
try {
return _broker.newInstance(cls);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -1488,8 +1338,7 @@
public boolean isDetached(Object obj) {
try {
return _broker.isDetached(obj);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBrokerFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBrokerFactory.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBrokerFactory.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBrokerFactory.java Wed Jul 19 14:34:44 2006
@@ -96,8 +96,7 @@
public OpenJPAConfiguration getConfiguration() {
try {
return _factory.getConfiguration();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -105,8 +104,7 @@
public Properties getProperties() {
try {
return _factory.getProperties();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -114,8 +112,7 @@
public Object putUserObject(Object key, Object val) {
try {
return _factory.putUserObject(key, val);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -123,8 +120,7 @@
public Object getUserObject(Object key) {
try {
return _factory.getUserObject(key);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -132,8 +128,7 @@
public Broker newBroker() {
try {
return _factory.newBroker();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -143,8 +138,7 @@
try {
return _factory.newBroker(user, pass, managed, connRetainMode,
findExisting);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -152,8 +146,7 @@
public void addLifecycleListener(Object listener, Class[] classes) {
try {
_factory.addLifecycleListener(listener, classes);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -161,8 +154,7 @@
public void removeLifecycleListener(Object listener) {
try {
_factory.removeLifecycleListener(listener);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -170,8 +162,7 @@
public void close() {
try {
_factory.close();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -179,8 +170,7 @@
public boolean isClosed() {
try {
return _factory.isClosed();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -188,8 +178,7 @@
public void lock() {
try {
_factory.lock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -197,8 +186,7 @@
public void unlock() {
try {
_factory.unlock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingExtent.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingExtent.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingExtent.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingExtent.java Wed Jul 19 14:34:44 2006
@@ -95,8 +95,7 @@
public Class getElementType() {
try {
return _extent.getElementType();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -104,8 +103,7 @@
public boolean hasSubclasses() {
try {
return _extent.hasSubclasses();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -113,8 +111,7 @@
public Broker getBroker() {
try {
return _extent.getBroker();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -122,8 +119,7 @@
public FetchConfiguration getFetchConfiguration() {
try {
return _extent.getFetchConfiguration();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -131,8 +127,7 @@
public boolean getIgnoreChanges() {
try {
return _extent.getIgnoreChanges();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -140,8 +135,7 @@
public void setIgnoreChanges(boolean ignoreCache) {
try {
_extent.setIgnoreChanges(ignoreCache);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -149,8 +143,7 @@
public List list() {
try {
return _extent.list();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -158,8 +151,7 @@
public Iterator iterator() {
try {
return _extent.iterator();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -167,8 +159,7 @@
public void closeAll() {
try {
_extent.closeAll();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -176,8 +167,7 @@
public void lock() {
try {
_extent.lock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -185,8 +175,7 @@
public void unlock() {
try {
_extent.unlock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}