db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1077998 - in /db/derby/code/trunk/java: engine/org/apache/derby/jdbc/ testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ testing/org/apache/derbyTesting/junit/
Date Fri, 04 Mar 2011 15:23:22 GMT
Author: rhillegas
Date: Fri Mar  4 15:23:22 2011
New Revision: 1077998

URL: http://svn.apache.org/viewvc?rev=1077998&view=rev
Log:
DERBY-4907: Back out 1077955 because it breaks the Derby build.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbeddedXADataSource.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbeddedXADataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbeddedXADataSource.java?rev=1077998&r1=1077997&r2=1077998&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbeddedXADataSource.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbeddedXADataSource.java Fri Mar
 4 15:23:22 2011
@@ -137,11 +137,8 @@ public class EmbeddedXADataSource extend
 			{
 				// If it is inactive, it is useless.
 				ra = null;
-				
-				// DERBY-4907 make sure the database name sent to find service
-				// does not include attributes.
-				String dbName = getShortDatabaseName();
-				
+
+				String dbName = getDatabaseName();
 				if (dbName != null) {
 
 					// see if database already booted, if it is, then don't make a

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java?rev=1077998&r1=1077997&r2=1077998&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java Fri
Mar  4 15:23:22 2011
@@ -79,9 +79,6 @@ public class ReferenceableDataSource imp
 	private String description;
 	private String dataSourceName;
 	private String databaseName;
-	/** shortDatabaseName has attributes of databaseName stripped */
-	private String shortDatabaseName;	
-
 	private String password;
 	private String user;
 	private int loginTimeout;
@@ -112,25 +109,11 @@ public class ReferenceableDataSource imp
 	*/
 	public final synchronized void setDatabaseName(String databaseName) {
 		this.databaseName = databaseName;
-		if( databaseName!= null && databaseName.contains(";")){
-			String[] dbShort = databaseName.split(";");
-			this.shortDatabaseName = dbShort[0];
-		}
-		else {
-			this.shortDatabaseName = databaseName;
-		}
 		update();
 	}
 	public String getDatabaseName() {
 		return databaseName;
 	}
-	
-	/**
-	 * @return databaseName with attributes stripped.
-	 */
-	protected String getShortDatabaseName() {
-		return shortDatabaseName;
-	}
 
 	/** 
 		Set the data source name.  The property is not mandatory.  It is used

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java?rev=1077998&r1=1077997&r2=1077998&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
Fri Mar  4 15:23:22 2011
@@ -832,67 +832,6 @@ public class J2EEDataSourceTest extends 
     }
 
     /**
-     * Test that a connection to XADataSource can be established
-     * successfully while creating a database using setDatabaseName()
-     * with create=true
-     *  
-     * @throws SQLException
-     * @throws XAException
-     */
-    public void testCreateInDatabaseName_XA() throws SQLException, XAException
-    {
-    	//test with XADataSource
-    	XADataSource xads = J2EEDataSource.getXADataSource();
-    	String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();    	
-    	J2EEDataSource.setBeanProperty(xads,"databaseName",dbName +";create=true");       
-    	XAConnection xa = xads.getXAConnection();
-    	Connection c = xa.getConnection();  
-    	c.setAutoCommit(false); 
-    	c.close();
-    }
-    
-    /**
-     * Test that a connection to PoolDataSource can be established
-     * successfully while creating a database using setDatabaseName()
-     * with create=true
-     * 
-     * @throws SQLException
-     */
-    
-    public void testCreateInDatabaseName_Pooled() throws SQLException
-    {
-    	//test with PooledConnection
-    	ConnectionPoolDataSource cpds = J2EEDataSource.getConnectionPoolDataSource();
-    	PooledConnection pc = cpds.getPooledConnection();
-    	String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
-    	J2EEDataSource.setBeanProperty(cpds, "databaseName",dbName +";create=true");
-    	Connection c;
-    	c = pc.getConnection();
-    	c.setAutoCommit(false);
-    	c.close();
-    	pc.close();
-    }
-    
-    /**
-     * Test that a connection to JDBCDataSource can be established
-     * successfully while creating a database using setDatabaseName()
-     * with create=true
-     * 
-     * @throws SQLException
-     */
-    
-    public void testCreateInDatabaseName_DS() throws SQLException
-    {
-    	DataSource ds = JDBCDataSource.getDataSource();
-    	String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
-    	JDBCDataSource.setBeanProperty(ds, "databaseName", dbName +";create=true");
-        Connection c = ds.getConnection();
-        c.setAutoCommit(false);
-        c.close();
-    }
-        
-    
-    /**
      * Test that a PooledConnection can be reused and closed
      * (separately) during the close event raised by the
      * closing of its logical connection.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java?rev=1077998&r1=1077997&r2=1077998&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java Fri
Mar  4 15:23:22 2011
@@ -135,7 +135,7 @@ public class JDBCDataSource {
     }
     
     /**
-     * Return a DataSource object of the passed in type
+     * Return a DataSource object of the passsed in type
      * configured with the passed in Java bean properties.
      * This will actually work with any object that has Java bean
      * setter methods.
@@ -231,7 +231,7 @@ public class JDBCDataSource {
     
     /**
      * Clear a String Java bean property by setting it to null.
-     * @param ds DataSource to have property cleared
+     * @param ds ds DataSource to have property cleared
      * @param property name of property.
      */
     public static void clearStringBeanProperty(Object ds, String property)



Mime
View raw message