db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-243) connection toString should uniquely identify the connection
Date Wed, 25 May 2005 21:21:09 GMT
     [ http://issues.apache.org/jira/browse/DERBY-243?page=all ]

David Van Couvering updated DERBY-243:

    Attachment: DERBY-243.diff

Here is an updated patch for this item.  This addresses my previous comment by pushing
the unique id down to the LanguageConnectionContext.

I also modified the trace and log output to use this id rather than the LCC instance
number.  This means that you can correlate the output from Connection.toString()
with the output in the error log and traces.

Finally, upon further rumination, I decided to remove the "Connection_" and 
"PooledConnection_" prefix from the toString() output.  As I worked with this
code, it seemed odd to have ths prefix here, when the user will normally print out 
debug code like 

  System.out.println("Connection: " + conn.toString());

Removing the "Connection_" prefix also means the output of toString() 
exactly matches the output of lcc.getId(), which may make it easier 
in the future to do filters against VTIs using the output of conn.toString().

Output of svn status:

M      java/engine/org/apache/derby/impl/sql/GenericStatement.java
M      java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
M      java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java
M      java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
M      java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
M      java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java
M      java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
M      java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
M      java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
M      java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
M      java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dataSourcePermissions.java
M      java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
M      java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net_sed.properties
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dataSourcePermissions_net.out
M      java/testing/org/apache/derbyTesting/functionTests/master/dataSourcePermissions.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dataSourcePermissions_net.out
M      java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
M      java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
M      java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties
M      java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java


> connection toString should uniquely identify the connection
> -----------------------------------------------------------
>          Key: DERBY-243
>          URL: http://issues.apache.org/jira/browse/DERBY-243
>      Project: Derby
>         Type: Improvement
>   Components: JDBC
>     Reporter: Kathey Marsden
>     Assignee: David Van Couvering
>     Priority: Trivial
>      Fix For:,,,
>  Attachments: DERBY-243.diff
> The toString() on the Derby connection doesn't print 
> unique information.
> for example  System.out.println(conn) prints:
> EmbedConnection  in the case of derby embedded
> It would be great if the toString() method for connections could be used to differentiate
one connection from another.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message