--- old/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java 2012-09-06 07:59:28.000000000 -0400 +++ new/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java 2012-09-06 07:59:28.000000000 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,6 @@ import java.io.*; import java.math.*; import java.util.*; -import java.beans.*; import javax.sql.rowset.*; @@ -83,12 +82,6 @@ */ private ResultSetMetaData resMD; - /** - * The property that helps to fire the property changed event when certain - * properties are changed in the JdbcRowSet object. This property - * is being added to satisfy Rave requirements. - */ - private PropertyChangeSupport propertyChangeSupport; /** * The Vector holding the Match Columns @@ -145,7 +138,6 @@ throw new RuntimeException(ioe); } - propertyChangeSupport = new PropertyChangeSupport(this); initParams(); @@ -268,7 +260,6 @@ throw new RuntimeException(ioe); } - propertyChangeSupport = new PropertyChangeSupport(this); initParams(); // set the defaults @@ -343,7 +334,6 @@ throw new RuntimeException(ioe); } - propertyChangeSupport = new PropertyChangeSupport(this); initParams(); @@ -360,10 +350,6 @@ setMaxRows(0); setMaxFieldSize(0); - // to ensure connection to a db call connect now - // and associate a conn with "this" object - // in this case. - conn = connect(); setParams(); setReadOnly(true); @@ -435,7 +421,6 @@ throw new RuntimeException(ioe); } - propertyChangeSupport = new PropertyChangeSupport(this); initParams(); @@ -620,12 +605,7 @@ } - // An alternate solution is required instead of having the - // connect method as protected. - // This is a work around to assist Rave Team - // :ah - - protected Connection connect() throws SQLException { + private Connection connect() throws SQLException { // Get a JDBC connection. @@ -4056,9 +4036,7 @@ // Added as per Rave requirements if( conn.getHoldability() != HOLD_CURSORS_OVER_COMMIT) { - ResultSet oldVal = rs; rs = null; - // propertyChangeSupport.firePropertyChange("ResultSet",oldVal,rs); } } @@ -4119,9 +4097,7 @@ // Makes the result ste handle null after rollback // Added as per Rave requirements - ResultSet oldVal = rs; rs = null; - // propertyChangeSupport.firePropertyChange("ResultSet", oldVal,rs); } @@ -4247,12 +4223,6 @@ rs = resultSet; } - - // Over riding the setCommand from BaseRowSet for - // firing the propertyChangeSupport Event for - // Rave requirements when this property's value - // changes. - /** * Sets this JdbcRowSet object's command property to * the given String object and clears the parameters, if any, @@ -4277,28 +4247,19 @@ * @see #getCommand */ public void setCommand(String command) throws SQLException { - String oldVal; if (getCommand() != null) { if(!getCommand().equals(command)) { - oldVal = getCommand(); super.setCommand(command); ps = null; rs = null; - propertyChangeSupport.firePropertyChange("command", oldVal,command); } } else { super.setCommand(command); - propertyChangeSupport.firePropertyChange("command", null,command); } } - // Over riding the setDataSourceName from BaseRowSet for - // firing the propertyChangeSupport Event for - // Rave requirements when this property's values - // changes. - /** * Sets the dataSourceName property for this JdbcRowSet * object to the given logical name and sets this JdbcRowSet object's @@ -4329,28 +4290,20 @@ * @see #getDataSourceName */ public void setDataSourceName(String dsName) throws SQLException{ - String oldVal; if(getDataSourceName() != null) { if(!getDataSourceName().equals(dsName)) { - oldVal = getDataSourceName(); super.setDataSourceName(dsName); conn = null; ps = null; rs = null; - propertyChangeSupport.firePropertyChange("dataSourceName",oldVal,dsName); } } else { super.setDataSourceName(dsName); - propertyChangeSupport.firePropertyChange("dataSourceName",null,dsName); } } - // Over riding the setUrl from BaseRowSet for - // firing the propertyChangeSupport Event for - // Rave requirements when this property's values - // changes. /** * Sets the Url property for this JdbcRowSet object @@ -4394,29 +4347,20 @@ */ public void setUrl(String url) throws SQLException { - String oldVal; if(getUrl() != null) { if(!getUrl().equals(url)) { - oldVal = getUrl(); super.setUrl(url); conn = null; ps = null; rs = null; - propertyChangeSupport.firePropertyChange("url", oldVal, url); } } else { super.setUrl(url); - propertyChangeSupport.firePropertyChange("url", null, url); } } - // Over riding the setUsername from BaseRowSet for - // firing the propertyChangeSupport Event for - // Rave requirements when this property's values - // changes. - /** * Sets the username property for this JdbcRowSet object * to the given user name. Because it @@ -4438,29 +4382,20 @@ * @see #getUsername */ public void setUsername(String uname) { - String oldVal; if( getUsername() != null) { if(!getUsername().equals(uname)) { - oldVal = getUsername(); super.setUsername(uname); conn = null; ps = null; rs = null; - propertyChangeSupport.firePropertyChange("username",oldVal,uname); } } else{ super.setUsername(uname); - propertyChangeSupport.firePropertyChange("username",null,uname); } } - // Over riding the setPassword from BaseRowSet for - // firing the propertyChangeSupport Event for - // Rave requirements when this property's values - // changes. - /** * Sets the password property for this JdbcRowSet object * to the given String object. Because it @@ -4481,21 +4416,17 @@ * that must be supplied to the database to create a connection */ public void setPassword(String password) { - String oldVal; if ( getPassword() != null) { if(!getPassword().equals(password)) { - oldVal = getPassword(); super.setPassword(password); conn = null; ps = null; rs = null; - propertyChangeSupport.firePropertyChange("password",oldVal,password); } } else{ super.setPassword(password); - propertyChangeSupport.firePropertyChange("password",null,password); } } @@ -4528,7 +4459,6 @@ if(oldVal != type) { super.setType(type); - propertyChangeSupport.firePropertyChange("type",oldVal,type); } } @@ -4561,78 +4491,6 @@ if(oldVal != concur) { super.setConcurrency(concur); - propertyChangeSupport.firePropertyChange("concurrency",oldVal,concur); - } - - } - - /** - * Sets the transaction isolation property for this JDBC RowSet object to the given - * constant. The DBMS will use this transaction isolation level for - * transactions if it can. - *

- * For RowSet implementations such as - * the CachedRowSet that operate in a disconnected environment, - * the SyncProvider object being used - * offers complementary locking and data integrity options. The - * options described below are pertinent only to connected RowSet - * objects (JdbcRowSet objects). - * - * @param transIso one of the following constants, listed in ascending order: - * Connection.TRANSACTION_NONE, - * Connection.TRANSACTION_READ_UNCOMMITTED, - * Connection.TRANSACTION_READ_COMMITTED, - * Connection.TRANSACTION_REPEATABLE_READ, or - * Connection.TRANSACTION_SERIALIZABLE - * @throws SQLException if the given parameter is not one of the Connection - * constants - * @see javax.sql.rowset.spi.SyncFactory - * @see javax.sql.rowset.spi.SyncProvider - * @see #getTransactionIsolation - */ - public void setTransactionIsolation(int transIso) throws SQLException { - - int oldVal; - - try { - oldVal = getTransactionIsolation(); - }catch(NullPointerException ex) { - oldVal = 0; - } - - if(oldVal != transIso) { - super.setTransactionIsolation(transIso); - propertyChangeSupport.firePropertyChange("transactionIsolation",oldVal,transIso); - } - - } - - /** - * Sets the maximum number of rows that this RowSet object may contain to - * the given number. If this limit is exceeded, the excess rows are - * silently dropped. - * - * @param mRows an int indicating the current maximum number - * of rows; zero means that there is no limit - * @throws SQLException if an error occurs internally setting the - * maximum limit on the number of rows that a JDBC RowSet object - * can contain; or if max is less than 0; or - * if max is less than the fetchSize of the - * RowSet - */ - public void setMaxRows(int mRows) throws SQLException { - - int oldVal; - - try { - oldVal = getMaxRows(); - }catch(NullPointerException ex) { - oldVal = 0; - } - - if(oldVal != mRows) { - super.setMaxRows(mRows); - propertyChangeSupport.firePropertyChange("maxRows",oldVal,mRows); } }