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 [38/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/...
Added: incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties (added)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties Wed Jul 19 14:34:44 2006
@@ -0,0 +1,142 @@
+union-sql-placeholder: Aborting UNION: cannot select placeholder for \
+ non-column select SQL.
+union-number-ordering: Aborting UNION: different numbers of order-by criteria \
+ in selects.
+union-incompat-ordering: Aborting UNION: incompatible ordering columns/sql or \
+ direction.
+union-unaligned-ordering: Aborting UNION: your database does not support \
+ ordering columns/sql that appear at different positions in the SELECTs \
+ that make up the UNION.
+union-element: Individual selects involved in a UNION do not support this \
+ operation.
+incompat-ordering: This query cannot be completed. The SQL SELECTs needed \
+ to complete the query have incompatible ordering. Their results cannot \
+ be merged.
+unpadded-char-cols: You are using CHAR columns with a data source or driver \
+ that doesn't implement OraclePreparedStatement.setFixedCHAR(). \
+ Comparisons on unpadded string values may fail.
+unconfigured-nchar-cols: You are using NCHAR or NCLOB columns with a \
+ data source or driver \
+ that doesn't implement OraclePreparedStatement.setFormOfUse(). \
+ Storing unicode values may fail or be corrupted.
+diff-values: Attempt to set column "{0}" to two different values: \
+ ({1})"{2}", ({3})"{4}" \
+ This can occur when you fail to set both sides of a two-sided relation \
+ between objects, or when you map different fields to the same column, but \
+ you do not keep the values of these fields in synch.
+feature-not-supported: The database dictionary in use ("{0}") reports that it \
+ does not have feature "{1}". This feature is needed to complete the \
+ current operation. To force OpenJPA to try to use the feature anyway, set \
+ the following property:\n\
+ org.apache.openjpa.jdbc.DBDictionary: {1}=<value>
+cant-outer-fk: Could not outer join the given foreign key "{0}" due to syntax \
+ and foreign key limitations. The join was converted to an inner join.
+no-auto-assign: This database dictionary does not support auto-assigned column \
+ values.
+bad-join: The following error was detected when creating a foreign key: \
+ "{0}". The foreign key is being ignored.
+sybase-compliance: They Sybase connection URL "{0}" may be invalid: \
+ it does not contain the parameter "BE_AS_JDBC_COMPLIANT_AS_POSSIBLE=true", \
+ which is required for the Sybase JConnect driver to behave in a \
+ JDBC-compliant way.
+sqlserver-cachedstmnts: The Microsoft JDBC driver has bugs that manifest \
+ themselves when prepared statements are pooled. Please disable prepared \
+ statement pooling when using the Microsoft JDBC driver by including \
+ "MaxCachedStatements=0" in your org.apache.openjpa.ConnectionFactoryProperties \
+ configuration property.
+sqlserver-netdirect-batch: The JNetDirect JDBC driver has problems when using \
+ batch statements. Please disable prepared \
+ statement pooling when using the this JDBC driver by including \
+ "BatchLimit=0" in your org.apache.openjpa.jdbc.DBDictionary \
+ configuration property.
+sqlserver-cursor: The SQLServer connection URL "{0}" may be invalid: \
+ it does not contain the parameter "SelectMethod=cursor", which is \
+ necessary for the driver to properly support large result sets.
+oracle-syntax: Oracle 8 does not support SQL92 syntax. You can avoid \
+ this message by setting the "JoinSyntax" DBDictionary property \
+ to "database".\
+ For example:\n\
+ org.apache.openjpa.jdbc.DBDictionary: oracle(JoinSyntax=database)
+oracle-batch-lob: LOB operations not allowed for batched statement: {0}
+oracle-batch-bug: The Oracle 9.2 JDBC driver has problems with \
+ batch statements and has been disabled by default. You can \
+ enable batched statements by setting the "BatchLimit" DBDictionary \
+ property. You may be able to bypass this problem by disabling \
+ prepared statement pooling. The compatible 9.0.1 driver does not \
+ have this behavior.
+oracle-batch-override: The BatchLimit property was set even though \
+ the Oracle 9.2 driver may not support this behavior correctly. \
+ If you see a number of invalid update count errors, you should \
+ disable statement batching by setting the BatchLimit property to 0.
+oracle-connecting-for-driver: OpenJPA is now connecting to the database in order \
+ to figure out what JDBC driver you are using, as OpenJPA must alter its \
+ behavior for this database depending on the driver vendor. To avoid this \
+ connection, set the DriverVendor value in your org.apache.openjpa.jdbc.DBDictionary \
+ configuration property to one of the following values:\n\
+ oracle, oracle92 (for the 9.2 driver), datadirect, datadirect61 \
+ (for driver versions <= 3.1), other \n\
+ For example:\n\
+ org.apache.openjpa.jdbc.DBDictionary: oracle(DriverVendor=oracle92)
+oracle-constant: Cannot outer join tables "{0}" and "{1}" using native \
+ join syntax and constant joins. If you are using Oracle 9 or higher, \
+ you should instead use SQL92 joins by specifying the JoinSyntax \
+ value in the org.apache.openjpa.jdbc.DBDictionary configuration property:\n\
+ org.apache.openjpa.jdbc.DBDictionary: oracle(JoinSyntax=sql92).
+oracle-savepoint: An error occurred when attempting to set an Oracle \
+ savepoint "{0}". You must use Oracle driver and database 9.2 or higher.
+oracle-rollback: An error occurred when attempting to rollback to an Oracle \
+ savepoint "{0}". You must use Oracle driver and database 9.2 or higher.
+oracle-unknown-svpt: Could not find an OracleConnection instance from this \
+ connection class "{0}".
+db2-cant-lock: DB2 cannot perform FOR UPDATE selects on multiple tables. \
+ The tables used in this select are: "{0}". You should either configure \
+ your application to avoid multi-table selects, use optimistic locking, \
+ or set the "SimulateLocking" DBDictionary property to allow non-locking \
+ selects within pessimistic transactions.
+informix-cant-lock: Informix cannot perform FOR UPDATE selects on multiple \
+ tables, or when it is a SELECT DISTINCT. The tables used in this select \
+ are: "{0}". You should either configure your application to avoid \
+ multi-table/distinct selects, use optimistic locking, or set the \
+ "SimulateLocking" DBDictionary property to allow non-locking selects \
+ within pessimistic transactions.
+bad-param: The specified parameter of type "{0}" is not a valid query parameter.
+warn-generic: Your database configuration was not recognized as a supported \
+ OpenJPA database. The generic dictionary will be used, which may result in \
+ limited functionality. This behavior can be overridden by specifying the \
+ appropriate dictionary class in the "org.apache.openjpa.jdbc.DBDictionary" \
+ property of the OpenJPA configuration.
+using-dict: Using dictionary class "{0}"{1}.
+no-pessimistic: This dictionary ({0}) does not support locking, so \
+ operations may not be performed using a Broker that does not have \
+ optimistic locking enabled.
+no-fk-table: Foreign key "{0}" on table "{1}" references a table \
+ ("{2}") that was not found.
+dd-lock-bug: This version of the DataDirect JDBC driver has a bug that \
+ prevents SELECT FOR UPDATE statements from working. Please \
+ use version 3.2 or higher of the driver.
+storage-restriction: The database "{0}" has restrictions that prevent it \
+ from being able to store the value "{1}" of type "{2}". The value \
+ will be rounded to "{3}" for storage.
+dict-not-supported: This database dictionary "{0}" is not officially supported \
+ by BEA.
+invalid-autoassign: This database dictionary "{0}" does not support \
+ auto-assigned column values. The column "{1}" may not behave as desired.
+psql-no-set-fetch-size: This version of the PostgreSQL JDBC driver does not \
+ support the Statement.setFetchSize() method. OpenJPA will no longer attempt \
+ to set the statement fetch size. To suppress this warning, ensure that \
+ the org.apache.openjpa.FetchBatchSize configuration property is set to zero. The \
+ original PostgreSQL driver exception is being logged for your reference.
+no-genkey: The last generated key query did not return any results.
+invalid-genkey: The column "{0}" was marked as being auto-assigned, but \
+ the server reported that the assigned value was null.
+indexof-not-supported: The database "{0}" does not support the \
+ indexOf function.
+substring-not-supported: The database "{0}" does not support the \
+ substring function.
+null-result-provider: supplied array of result object providers is null
+empty-result-provider: supplied array of result object providers is empty
+null-shared-result-set: supplied result set is null
+illegal-method: {0}.{1}() is illegal to be invoked
+column-not-mapped: SQLResultSetMapping "{0}" does not map the columns "{1}" \
+ that are selected by the SQL query\r\n "{2}"
+batch-license: Your license does not have SQL batching capabilities.
Propchange: incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-keywords.rsrc
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-keywords.rsrc?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-keywords.rsrc (added)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-keywords.rsrc Wed Jul 19 14:34:44 2006
@@ -0,0 +1 @@
+ABSOLUTE,ACTION,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,ASC,ASSERTION,AT,AUTHORIZATION,AVG,BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,CHAR,CHARACTER,CHAR_LENGTH,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,DISTINCT,DOMAIN,DOUBLE,DROP,ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,EXISTS,EXTERNAL,EXTRACT,FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FOUND,FROM,FULL,GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,IDENTITY,IMMEDIATE,IN,INDICATOR,INITIALLY,INNER,INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,MATCH,MAX,MIN,MINUTE,MODULE,MONTH,NAMES,NATIONAL,NATURAL,NCHA
R,NEXT,NO,NOT,NULL,NULLIF,NUMERIC,OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,PAD,PARTIAL,POSITION,PRECISION,PREPARE,PRESERVE,PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS,SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,SMALLINT,SOME,SPACE,SQL,SQLCODE,SQLERROR,SQLSTATE,SUBSTRING,SUM,SYSTEM_USER,TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,YEAR,ZONE,ADA,C,CATALOG_NAME,CHARACTER_SET_CATALOG,CHARACTER_SET_NAME,CHARACTER_SET_SCHEMA,CLASS_ORIGIN,COBOL,COLLATION_CATALOG,COLLATION_NAME,COLLATION_SCHEMA,COLUMN_NAME,COMMAND_FUNCTION,COMMITTED,CONDITION_NUMBER,CONNECTION_NAME,CONSTRAINT_CATALOG,CONSTRAINT_NAME,CONSTRAINT_SCHEMA,CURSOR_NAME,DATA,DATETIME_INTERVAL_CODE,DATETIME_INTERVAL_PREC
ISION,DYNAMIC_FUNCTION,FORTRAN,LENGTH,MESSAGE_LENGTH,MESSAGE_OCTET_LENGTH,MESSAGE_TEXT,MORE,MUMPS,NAME,NULLABLE,NUMBER,PASCAL,PLI,REPEATABLE,RETURNED_LENGTH,RETURNED_OCTET_LENGTH,RETURNED_SQLSTATE,ROW_COUNT,SCALE,SCHEMA_NAME,SERIALIZABLE,SERVER_NAME,SUBCLASS_ORIGIN,TABLE_NAME,TYPE,UNCOMMITTED,UNNAMED
Propchange: incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-keywords.rsrc
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java Wed Jul 19 14:34:44 2006
@@ -122,8 +122,7 @@
if (enhancer.run() == PCEnhancer.ENHANCE_NONE)
return null;
return enhancer.getBytecode().toByteArray();
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
_log.warn(_loc.get("cft-exception-thrown", className), t);
if (t instanceof RuntimeException)
throw (RuntimeException) t;
@@ -162,11 +161,9 @@
if (_repos.getMetaData(c, null, false) != null)
return Boolean.TRUE;
return null;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw re;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new GeneralException(t);
}
}
@@ -217,8 +214,7 @@
name = new String(b, entries[utfEntry] + 2, len, "UTF-8");
if ("openjpa/enhance/PersistenceCapable".equals(name))
return true;
- }
- catch (UnsupportedEncodingException uee) {
+ } catch (UnsupportedEncodingException uee) {
throw new ClassFormatError(uee.toString());
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/ProductDerivations.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/ProductDerivations.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/ProductDerivations.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/ProductDerivations.java Wed Jul 19 14:34:44 2006
@@ -39,8 +39,7 @@
for (int i = 0; i < pdcls.length; i++) {
try {
derivations.add(pdcls[i].newInstance());
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
// invalid service
}
}
@@ -57,8 +56,7 @@
for (int i = 0; i < _derivations.length; i++) {
try {
_derivations[i].beforeConfigurationConstruct(cp);
- }
- catch (Exception e) {
+ } catch (Exception e) {
// can't log; no configuration yet
e.printStackTrace();
}
@@ -73,8 +71,7 @@
for (int i = 0; i < _derivations.length; i++) {
try {
_derivations[i].beforeConfigurationLoad(conf);
- }
- catch (Exception e) {
+ } catch (Exception e) {
// logging not configured yet
e.printStackTrace();
}
@@ -89,8 +86,7 @@
for (int i = 0; i < _derivations.length; i++) {
try {
_derivations[i].afterSpecificationSet(conf);
- }
- catch (Exception e) {
+ } catch (Exception e) {
// logging not configured yet
e.printStackTrace();
}
@@ -105,8 +101,7 @@
for (int i = 0; i < _derivations.length; i++) {
try {
_derivations[i].afterClose(impl);
- }
- catch (Exception e) {
+ } catch (Exception e) {
// logging not available
e.printStackTrace();
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java Wed Jul 19 14:34:44 2006
@@ -421,8 +421,7 @@
ExpirationEvent ev = (ExpirationEvent) event;
try {
listen.onExpire(ev);
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (log.isWarnEnabled())
log.warn(s_loc.get ("exp-listener-ex"), e);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java Wed Jul 19 14:34:44 2006
@@ -72,8 +72,7 @@
if (hasListeners())
fireEvent(ev);
keys = keySet();
- }
- finally {
+ } finally {
writeUnlock();
}
@@ -303,8 +302,7 @@
TypesChangedEvent ev = (TypesChangedEvent) event;
try {
listen.onTypesChanged(ev);
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (log.isWarnEnabled())
log.warn(s_loc.get("exp-listener-ex"), e);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/Caches.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/Caches.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/Caches.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/Caches.java Wed Jul 19 14:34:44 2006
@@ -46,8 +46,7 @@
if (classes == null)
classes = new HashSet();
classes.add(cls);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
conf.getLog(OpenJPAConfiguration.LOG_RUNTIME).warn(t, t);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java Wed Jul 19 14:34:44 2006
@@ -137,8 +137,7 @@
}
}
lastRun = now;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new InvalidStateException(_loc.get("scheduler-fail"), e).
setFatal(true);
}
@@ -185,8 +184,7 @@
dayOfMonth = parse(token.nextToken(), 1, 31);
month = parse(token.nextToken(), 1, 13);
dayOfWeek = parse(token.nextToken(), 1, 8);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new UserException(_loc.get("bad-schedule", date), t).
setFatal(true);
}
@@ -200,8 +198,7 @@
for (int i = 0; i < tokens.length; i++) {
try {
times[i] = Integer.parseInt(tokens[i]);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new UserException(_loc.get("not-number", token)).
setFatal(true);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java Wed Jul 19 14:34:44 2006
@@ -84,8 +84,7 @@
try {
super.commit();
updateCaches();
- }
- finally {
+ } finally {
_inserts = null;
_updates = null;
_deletes = null;
@@ -95,8 +94,7 @@
public void rollback() {
try {
super.rollback();
- }
- finally {
+ } finally {
_inserts = null;
_updates = null;
_deletes = null;
@@ -220,8 +218,7 @@
transformToVersionSafePCDatas(cache, mods.existingUpdates);
cache.commit(mods.additions, mods.newUpdates,
mods.existingUpdates, mods.deletes);
- }
- finally {
+ } finally {
cache.writeUnlock();
}
}
@@ -357,8 +354,7 @@
data = newPCData(sm);
data.store(sm);
cache.put(data);
- }
- finally {
+ } finally {
cache.writeUnlock();
}
return true;
@@ -405,8 +401,7 @@
cache.put(data);
else
cache.update(data);
- }
- finally {
+ } finally {
cache.writeUnlock();
}
return true;
@@ -499,8 +494,7 @@
cache.put(data);
else
cache.update(data);
- }
- finally {
+ } finally {
cache.writeUnlock();
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java Wed Jul 19 14:34:44 2006
@@ -95,8 +95,7 @@
return null;
try {
return _cache.getName();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -106,8 +105,7 @@
return;
try {
_cache.setName(name);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -117,8 +115,7 @@
return;
try {
_cache.initialize(manager);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -129,8 +126,7 @@
return;
try {
_cache.commit(additions, newUpdates, existingUpdates, deletes);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -140,8 +136,7 @@
return false;
try {
return _cache.contains(oid);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -151,8 +146,7 @@
return EMPTY_BITSET;
try {
return _cache.containsAll(oids);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -162,8 +156,7 @@
return null;
try {
return _cache.get(oid);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -173,8 +166,7 @@
return null;
try {
return _cache.put(value);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -184,8 +176,7 @@
return;
try {
_cache.update(value);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -195,8 +186,7 @@
return null;
try {
return _cache.remove(oid);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -206,8 +196,7 @@
return EMPTY_BITSET;
try {
return _cache.removeAll(oids);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -217,8 +206,7 @@
return;
try {
_cache.removeAll(cls, subclasses);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -228,8 +216,7 @@
return;
try {
_cache.clear();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -239,8 +226,7 @@
return false;
try {
return _cache.pin(oid);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -250,8 +236,7 @@
return EMPTY_BITSET;
try {
return _cache.pinAll(oids);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -261,8 +246,7 @@
return false;
try {
return _cache.unpin(oid);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -272,8 +256,7 @@
return EMPTY_BITSET;
try {
return _cache.unpinAll(oids);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -283,8 +266,7 @@
return;
try {
_cache.writeLock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -294,8 +276,7 @@
return;
try {
_cache.writeUnlock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -305,8 +286,7 @@
return;
try {
_cache.addExpirationListener(listen);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -316,8 +296,7 @@
return false;
try {
return _cache.removeExpirationListener(listen);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -327,8 +306,7 @@
return;
try {
_cache.close();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java Wed Jul 19 14:34:44 2006
@@ -89,8 +89,7 @@
return;
try {
_cache.initialize(mgr);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -100,8 +99,7 @@
return;
try {
_cache.onTypesChanged(e);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -111,8 +109,7 @@
return null;
try {
return _cache.get(qk);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -122,8 +119,7 @@
return null;
try {
return _cache.put(qk, oids);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -133,8 +129,7 @@
return null;
try {
return _cache.remove(qk);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -144,8 +139,7 @@
return;
try {
_cache.clear();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -155,8 +149,7 @@
return false;
try {
return _cache.pin(qk);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -166,8 +159,7 @@
return false;
try {
return _cache.unpin(qk);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -177,8 +169,7 @@
return;
try {
_cache.writeLock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -188,8 +179,7 @@
return;
try {
_cache.writeUnlock();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -199,8 +189,7 @@
return;
try {
_cache.addTypesChangedListener(listen);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -210,8 +199,7 @@
return false;
try {
return _cache.removeTypesChangedListener(listen);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
@@ -221,8 +209,7 @@
return;
try {
_cache.close();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw translate(re);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Wed Jul 19 14:34:44 2006
@@ -346,8 +346,7 @@
public Number executeDelete(StoreQuery q, Object[] params) {
try {
return _ex.executeDelete(unwrap(q), params);
- }
- finally {
+ } finally {
clearAccesssPath(q);
}
}
@@ -355,8 +354,7 @@
public Number executeDelete(StoreQuery q, Map params) {
try {
return _ex.executeDelete(unwrap(q), params);
- }
- finally {
+ } finally {
clearAccesssPath(q);
}
}
@@ -364,8 +362,7 @@
public Number executeUpdate(StoreQuery q, Object[] params) {
try {
return _ex.executeUpdate(unwrap(q), params);
- }
- finally {
+ } finally {
clearAccesssPath(q);
}
}
@@ -373,8 +370,7 @@
public Number executeUpdate(StoreQuery q, Map params) {
try {
return _ex.executeUpdate(unwrap(q), params);
- }
- finally {
+ } finally {
clearAccesssPath(q);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java Wed Jul 19 14:34:44 2006
@@ -103,8 +103,7 @@
if (WLS != null) {
try {
tm = WLS.getTransactionManager();
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
errors.add(t);
}
if (tm != null) {
@@ -119,8 +118,7 @@
jmr.setTransactionManagerName(JNDI_LOCS[i]);
try {
tm = jmr.getTransactionManager();
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
errors.add(t);
}
if (tm != null) {
@@ -136,8 +134,7 @@
imr.setTransactionManagerMethod(METHODS[i]);
try {
tm = imr.getTransactionManager();
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
errors.add(t);
}
if (tm != null) {
@@ -149,8 +146,7 @@
if (SUNONE != null) {
try {
tm = SUNONE.getTransactionManager();
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
errors.add(t);
}
if (tm != null) {
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/JNDIManagedRuntime.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/JNDIManagedRuntime.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/JNDIManagedRuntime.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/JNDIManagedRuntime.java Wed Jul 19 14:34:44 2006
@@ -49,8 +49,7 @@
Context ctx = new InitialContext();
try {
return (TransactionManager) ctx.lookup(_tmLoc);
- }
- finally {
+ } finally {
ctx.close();
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java Wed Jul 19 14:34:44 2006
@@ -1268,8 +1268,7 @@
try {
if (!run(conf, args, opts))
System.err.println(_loc.get("appid-usage"));
- }
- finally {
+ } finally {
conf.close();
}
}
@@ -1405,8 +1404,7 @@
loader = Thread.currentThread().getContextClassLoader();
try {
return Class.forName(name, false, loader);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
}
// create class
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java Wed Jul 19 14:34:44 2006
@@ -166,8 +166,7 @@
((Object[]) null);
_project.clear(); // remove old refs
return data;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new InternalException("cons-access", t).setFatal(true);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java Wed Jul 19 14:34:44 2006
@@ -304,11 +304,9 @@
if (_log.isWarnEnabled())
_log.warn(_loc.get("pers-aware", _pc.getType()));
return ENHANCE_AWARE;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
}
}
@@ -656,8 +654,7 @@
try {
owner.getDeclaredField(fieldName);
break;
- }
- catch (Exception e) {
+ } catch (Exception e) {
}
}
if (owner.getName().equals(Object.class.getName()))
@@ -1646,14 +1643,12 @@
try {
oidType.getConstructor(new Class[]{ Class.class, String.class });
return Boolean.TRUE;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
}
try {
oidType.getConstructor(new Class[]{ String.class });
return Boolean.FALSE;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
}
return null;
}
@@ -2045,8 +2040,7 @@
try {
uid = Numbers.valueOf(ObjectStreamClass.lookup
(_meta.getDescribedType()).getSerialVersionUID());
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
// last-chance catch for bug #283 (which can happen
// in a variety of ClassLoading environments)
_log.warn(_loc.get("enhance-uid-access", _meta), t);
@@ -2540,11 +2534,9 @@
try {
return cls.getDeclaredField(name);
- }
- catch (NoSuchFieldException nsfe) {
+ } catch (NoSuchFieldException nsfe) {
return findDeclaredField(cls.getSuperclass(), name);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
}
}
@@ -2569,11 +2561,9 @@
try {
return cls.getDeclaredMethod(name, params);
- }
- catch (NoSuchMethodException nsme) {
+ } catch (NoSuchMethodException nsme) {
return findDeclaredMethod(cls.getSuperclass(), name, params);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
}
}
@@ -2810,8 +2800,7 @@
try {
addDetachExternalize(parentDetachable,
_meta.usesDetachedState() != Boolean.FALSE);
- }
- catch (NoSuchMethodException nsme) {
+ } catch (NoSuchMethodException nsme) {
throw new GeneralException(nsme);
}
}
@@ -3376,8 +3365,7 @@
try {
if (!run(conf, args, opts))
System.err.println(_loc.get("enhance-usage"));
- }
- finally {
+ } finally {
conf.close();
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/BeanLifecycleCallbacks.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/BeanLifecycleCallbacks.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/BeanLifecycleCallbacks.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/BeanLifecycleCallbacks.java Wed Jul 19 14:34:44 2006
@@ -50,8 +50,7 @@
super(method, arg);
try {
_listener = cls.newInstance();
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new UserException(_loc.get("bean-constructor",
cls.getName()), t);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/JMSRemoteCommitProvider.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/JMSRemoteCommitProvider.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/JMSRemoteCommitProvider.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/JMSRemoteCommitProvider.java Wed Jul 19 14:34:44 2006
@@ -118,8 +118,7 @@
_publisher.publish(createMessage(event));
if (log.isTraceEnabled())
log.trace(s_loc.get("jms-sent-update", _topicName));
- }
- catch (JMSException jmse) {
+ } catch (JMSException jmse) {
if (log.isWarnEnabled())
log.warn(s_loc.get("jms-send-error", _topicName), jmse);
}
@@ -136,8 +135,7 @@
catch (JMSException jmse) {
if (log.isWarnEnabled())
log.warn(s_loc.get("jms-close-error", _topicName), jmse);
- }
- finally {
+ } finally {
_connection = null;
}
}
@@ -179,11 +177,9 @@
_connection.setExceptionListener(this);
if (log.isInfoEnabled())
log.info(s_loc.get("jms-start-listener", _topicName));
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UserException(s_loc.get("jms-provider-config",
_topicName, _tcfName), e).setFatal(true);
}
@@ -209,8 +205,7 @@
Object o;
try {
o = om.getObject();
- }
- catch (JMSException jmse) {
+ } catch (JMSException jmse) {
if (log.isWarnEnabled())
log.warn(s_loc.get("jms-receive-error-1"), jmse);
return;
@@ -256,14 +251,12 @@
String.valueOf(i + 1)));
connect();
connected = true;
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (log.isInfoEnabled())
log.info(s_loc.get("jms-reconnect-fail", _topicName), e);
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ie) {
+ } catch (InterruptedException ie) {
break;
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java Wed Jul 19 14:34:44 2006
@@ -316,8 +316,7 @@
for (int i = 0; !_fail && i < callbacks.length; i++) {
try {
callbacks[i].makeCallback(source, related, type);
- }
- catch (Exception e) {
+ } catch (Exception e) {
exceptions.add(e);
if (failFast)
_fail = true;
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/MethodLifecycleCallbacks.java Wed Jul 19 14:34:44 2006
@@ -93,8 +93,7 @@
protected static Method getMethod(Class cls, String method, Class[] args) {
try {
return cls.getMethod(method, args);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
try {
// try again with the declared methods, which will
// check private and protected methods
@@ -102,8 +101,7 @@
if (!m.isAccessible())
m.setAccessible(true);
return m;
- }
- catch (Throwable t2) {
+ } catch (Throwable t2) {
throw new UserException(_loc.get("method-notfound",
cls.getName(), method), t);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/RemoteCommitEvent.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/RemoteCommitEvent.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/RemoteCommitEvent.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/RemoteCommitEvent.java Wed Jul 19 14:34:44 2006
@@ -176,8 +176,7 @@
_addIds = (Collection) in.readObject();
_updates = (Collection) in.readObject();
_deletes = (Collection) in.readObject();
- }
- catch (ClassNotFoundException cnfe) {
+ } catch (ClassNotFoundException cnfe) {
// ### do something
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java Wed Jul 19 14:34:44 2006
@@ -263,8 +263,7 @@
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock lock) {
try {
lock.writeLock().lockInterruptibly();
- }
- catch (InterruptedException e) {
+ } catch (InterruptedException e) {
}
}
@@ -277,8 +276,7 @@
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock lock) {
try {
lock.readLock().lockInterruptibly();
- }
- catch (InterruptedException e) {
+ } catch (InterruptedException e) {
}
}
@@ -306,8 +304,7 @@
_listener = new TCPPortListener(_port, log);
_listener.listen();
s_portListenerMap.put(String.valueOf(_port), _listener);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(s_loc.get("tcp-init-exception",
String.valueOf(_port)), e).setFatal(true);
}
@@ -364,8 +361,7 @@
sendUpdatePacket(bytes);
else
_broadcastQueue.addPacket(bytes);
- }
- catch (IOException ioe) {
+ } catch (IOException ioe) {
if (log.isWarnEnabled())
log.warn(s_loc.get("tcp-payload-create-error"), ioe);
}
@@ -380,8 +376,7 @@
try {
for (Iterator iter = _addresses.iterator(); iter.hasNext();)
((HostAddress) iter.next()).sendUpdatePacket(bytes);
- }
- finally {
+ } finally {
releaseReadLock(_addressesLock);
}
}
@@ -394,8 +389,7 @@
try {
for (Iterator iter = _addresses.iterator(); iter.hasNext();)
((HostAddress) iter.next()).close();
- }
- finally {
+ } finally {
releaseWriteLock(_addressesLock);
}
@@ -446,8 +440,7 @@
// This will block until there is a packet to send.
byte[] bytes = _broadcastQueue.removePacket();
sendUpdatePacket(bytes);
- }
- catch (InterruptedException e) {
+ } catch (InterruptedException e) {
// End the thread.
break;
}
@@ -539,8 +532,7 @@
_isRunning = false;
try {
_receiveSocket.close();
- }
- catch (IOException ioe) {
+ } catch (IOException ioe) {
if (_log.isWarnEnabled())
_log.warn(s_loc.get("tcp-close-error"), ioe);
}
@@ -576,8 +568,7 @@
receiverThread.setDaemon(true);
receiverThread.start();
_receiverThreads.add(receiverThread);
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (!(e instanceof SocketException) || _isRunning)
if (_log.isWarnEnabled())
_log.warn(s_loc.get("tcp-accept-error"), e);
@@ -587,8 +578,7 @@
try {
if (s != null)
s.close();
- }
- catch (Exception ee) {
+ } catch (Exception ee) {
if (_log.isWarnEnabled())
_log.warn(s_loc.get("tcp-close-error"), e);
}
@@ -611,8 +601,7 @@
try {
if (_isRunning)
_receiveSocket.close();
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (_log.isWarnEnabled())
_log.warn(s_loc.get("tcp-close-error"), e);
}
@@ -641,13 +630,11 @@
try {
_s.setTcpNoDelay(true);
_in = new BufferedInputStream(s.getInputStream());
- }
- catch (IOException ioe) {
+ } catch (IOException ioe) {
if (_log.isInfoEnabled())
_log.info(s_loc.get("tcp-socket-option-error"), ioe);
_s = null;
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (_log.isWarnEnabled())
_log.warn(s_loc.get("tcp-receive-error"), e);
_s = null;
@@ -662,8 +649,7 @@
// This will block our thread, waiting to read
// the next Event-object-message.
handle(_in);
- }
- catch (EOFException eof) {
+ } catch (EOFException eof) {
// EOFException raised when peer is properly
// closing its end.
if (_log.isTraceEnabled()) {
@@ -672,13 +658,11 @@
+ ":" + _s.getPort()));
}
break;
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (_log.isWarnEnabled())
_log.warn(s_loc.get("tcp-receive-error"), e);
break;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
}
}
// We are done receiving on this socket and this worker
@@ -686,8 +670,7 @@
try {
_in.close();
_s.close();
- }
- catch (Exception e) {
+ } catch (Exception e) {
_log.warn(s_loc.get("tcp-close-socket-error",
_s.getInetAddress().getHostAddress() + ":"
+ _s.getPort()), e);
@@ -790,8 +773,7 @@
// will close all sockets in the pool.
try {
_socketPool.close();
- }
- catch (Exception e) {
+ } catch (Exception e) {
if (log.isWarnEnabled()) {
log.warn(s_loc.get("tcp-close-pool-error"), e);
}
@@ -822,8 +804,7 @@
// Return the socket to the pool; the socket is
// still good.
returnSocket(s);
- }
- catch (Exception e) {
+ } catch (Exception e) {
// There has been a problem sending to the peer.
// The OS socket that was being used is can no longer
// be used.
@@ -882,8 +863,7 @@
// pool.
try {
_socketPool.invalidateObject(s);
- }
- catch (Exception e) {
+ } catch (Exception e) {
}
}
@@ -911,8 +891,7 @@
log.trace(s_loc.get("tcp-close-sending-socket",
_address + ":" + _port, "" + s.getLocalPort()));
s.close();
- }
- catch (Exception e) {
+ } catch (Exception e) {
log.warn(s_loc.get("tcp-close-socket-error",
_address.getHostAddress() + ":" + _port), e);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java Wed Jul 19 14:34:44 2006
@@ -177,14 +177,11 @@
_brokers.add(broker);
return broker;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw new GeneralException(re);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -237,8 +234,7 @@
for (Iterator itr = _pcClassNames.iterator(); itr.hasNext();) {
try {
Class.forName((String) itr.next(), true, loader);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
_conf.getLog(OpenJPAConfiguration.LOG_RUNTIME).warn(t, t);
}
}
@@ -252,8 +248,7 @@
if (_lifecycleListeners == null)
_lifecycleListeners = new HashMap(7);
_lifecycleListeners.put(listener, classes);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -264,8 +259,7 @@
assertOpen();
if (_lifecycleListeners != null)
_lifecycleListeners.remove(listener);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -304,8 +298,7 @@
_conf.close();
_closed = new IllegalStateException();
- }
- finally {
+ } finally {
unlock();
}
}
@@ -329,8 +322,7 @@
try {
assertOpen();
return (_userObjects == null) ? null : _userObjects.get(key);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -345,8 +337,7 @@
if (_userObjects == null)
_userObjects = new HashMap();
return _userObjects.put(key, val);
- }
- finally {
+ } finally {
unlock();
}
}
@@ -444,11 +435,9 @@
|| trans.getStatus() == Status.STATUS_NO_TRANSACTION
|| trans.getStatus() == Status.STATUS_UNKNOWN)
return null;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
}
@@ -543,8 +532,7 @@
// avoid synchronization
_conf.setReadOnly(true);
_conf.instantiateAll();
- }
- finally {
+ } finally {
unlock();
}
}
@@ -631,11 +619,9 @@
}
return true;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachManager.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachManager.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachManager.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachManager.java Wed Jul 19 14:34:44 2006
@@ -95,12 +95,10 @@
CallbackException excep = null;
try {
return attach(pc, null, null, null);
- }
- catch (CallbackException ce) {
+ } catch (CallbackException ce) {
excep = ce;
return null; // won't be reached as the exceps will be rethrown
- }
- finally {
+ } finally {
List exceps = null;
if (excep == null || !_failFast)
exceps = invokeAfterAttach(null);
@@ -125,8 +123,7 @@
for (Iterator itr = instances.iterator(); itr.hasNext(); i++) {
try {
attached[i] = attach(itr.next(), null, null, null);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
// track exceptions and optimistic failed objects
if (opt && !(ke instanceof OptimisticException))
opt = false;
@@ -143,8 +140,7 @@
exceps = add(exceps, re);
}
}
- }
- finally {
+ } finally {
// invoke post callbacks unless all failed
if (!failFast && (exceps == null
|| exceps.size() < instances.size()))
@@ -171,8 +167,7 @@
try {
_broker.fireLifecycleEvent(attached, entry.getKey(),
sm.getMetaData(), LifecycleEvent.AFTER_ATTACH);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
exceps = add(exceps, re);
if (_failFast && re instanceof CallbackException)
break;
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java Wed Jul 19 14:34:44 2006
@@ -61,15 +61,13 @@
try {
Method meth = cls.getMethod("newInstance", FACTORY_ARGS);
return (BrokerFactory) meth.invoke(null, new Object[]{ conf });
- }
- catch (InvocationTargetException ite) {
+ } catch (InvocationTargetException ite) {
Throwable cause = ite.getTargetException();
if (cause instanceof OpenJPAException)
throw (OpenJPAException) cause;
throw new InternalException(s_loc.get("new-brokerfactory-excep",
cls), cause);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UserException(s_loc.get("bad-new-brokerfactory", cls),
e).setFatal(true);
}
@@ -97,15 +95,13 @@
try {
Method meth = cls.getMethod("getInstance", FACTORY_ARGS);
return (BrokerFactory) meth.invoke(null, new Object[]{ conf });
- }
- catch (InvocationTargetException ite) {
+ } catch (InvocationTargetException ite) {
Throwable cause = ite.getTargetException();
if (cause instanceof OpenJPAException)
throw (OpenJPAException) cause;
throw new InternalException(s_loc.get("brokerfactory-excep", cls),
cause);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UserException(s_loc.get("bad-brokerfactory", cls), e).
setFatal(true);
}
@@ -132,8 +128,7 @@
try {
return Class.forName(clsName, true, loader);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UserException(s_loc.get("bad-brokerfactory-class",
clsName), e).setFatal(true);
}