[ 
http://issues.apache.org/jira/browse/DERBY-412?page=comments#action_12316427 ] 

David Van Couvering commented on DERBY-412:
-------------------------------------------

OK, we have a bit of a problem here.  BrokeredConnection does not have direct 
access to the SESSIONID, DATABASE, etc., because it does not have access to the 
LanguageConnectionContext.

It has a method getRealConnection() that returns a Connection.  I could cast it 
to EmbedConnection and then use that to get access to the 
LanguageConnectionContext, but that doesn't seem right to me.  I think that 
really BrokeredConnection shouldn't make any assumptions about the underlying 
type of the Connection.  So I think it should just print the toString() of the 
wrapped connection.

So I'm proposing we go with

"[EMAIL PROTECTED], Wrapped Connection = [EMAIL PROTECTED] (XID = 19), 
(SESSIONID = 1), (DATABASE = wombat), (DRDAID = null)"

Any objections?

Thanks,

David

> Connection toString should show type information and  the meaning of the 
> identifier that it prints
> --------------------------------------------------------------------------------------------------
>
>          Key: DERBY-412
>          URL: http://issues.apache.org/jira/browse/DERBY-412
>      Project: Derby
>         Type: Bug
>     Versions: 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: David Van Couvering
>      Fix For: 10.2.0.0
>  Attachments: DERBY-412.diff
>
> After the change for DERBY-243 the  connection toString() output is  an 
> integer which correspond to SESSIONID.  The output should identify the type 
> and also the meaning of the identifier that it prints.  Perhaps a format that 
> appends the default toString output with the sessionid information as it 
> prints in the derby.log would be more informative.
> [EMAIL PROTECTED] (SESSONID = 2)
> Ultimately this could be expanded to included other diagnostic information e.g
> [EMAIL PROTECTED] (XID = 132), (SESSIONID = 5), (DATABASE = wombat), (DRDAID 
> = NF000001.H324-940125304405039114{7})

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to