db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <David.Vancouver...@Sun.COM>
Subject Re: The new connection toString()
Date Tue, 21 Jun 2005 19:58:42 GMT
Sigh...  The problem is there are two uses for this output.  One is for 
human-readability of Connection.toString(), and one is for correlating 
the connection string with the SESSID/LCCID in the error log.

When just looking at it from the point of view of the first usage, the 
simple integer looks unhelpful.  Looking at it from the point of view of 
the second usage, having the class name in there makes it harder to do 
the correlation.  For example, you couldn't just do (in pseudocode):

SELECT * FROM ErrorLogVTI where SESSID=conn.toString()

IMHO, if a user needs to distinguish between class names, they can 
easily print it out as a prefix.  But I'll defer to the majority opinion 


Kathey Marsden wrote:

> I received this feedback on our  new  connection toString() output.  I
> personally am not a big fan of the integer by itself  either but thought
> I was being picky after a long discussion.   
> I  noticed a problem that the toString() of the connection returns an
> integer for the connection (e.g. 1)
> Sample output  is:
> the xaconnection is: 0
> the xaconnection1 is: 1
> the connection is: 1
> the second is: 2
> as you see its numbers, without any mention of the object type itself,
> this will make problems very difficult to debug. 
> Thoughts?
> Kathey

View raw message