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

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

For those of you working on internationalizing the network client messages, you 
need to take care when choosing a SQL State for a new client messages (e.g. one 
that is not duplicated or closely duplicated in the engine's 
messages.properties file).

In most cases you can use "XN" which means a vendor-specific SQL State.  
However, if the error matches a predefined SQL State (either a class, subclass, 
or entire state) in the SQL2003 spec, you should use that.  For example, an 
exception that affects the connection should use the prefix 08.  A connection 
failure must be exactly 08006, connection does not exist 08003.  The SQL State 
definitions can be found in section 23.1 of the SQL 2003 spec.

Somebody correct me if I'm missing something, but there is also an entire set 
of SQLStates required by DRDA which (in general) are currently not being set by 
the client code.  These SQLStates are defined in Chapter 8 (Volume 1) of the 
DRDA spec.  We will need to set the SQL State appropriately based on this spec 
in the org/apache/derby/client/net classes.   I know this code is hard to parse 
through if you're new to DRDA, so please do send out email if you need 
help/guidance.

Note that doing this as correctly as possible is important for portability and 
also for future JDBC4 work where you create the appropriate SQLException 
subclass based on the SQL State...

Thanks,

David 

> Network client message strings not internationalized
> ----------------------------------------------------
>
>          Key: DERBY-400
>          URL: http://issues.apache.org/jira/browse/DERBY-400
>      Project: Derby
>         Type: Improvement
>   Components: Network Client
>     Versions: 10.1.1.0
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering
>     Priority: Minor
>  Attachments: DERBY-400.diff
>
> In investigating DERBY-254, I discovered that all SQLExceptions are thrown 
> with hardcoded English error messages.  This needs to be modified to use 
> message string resource bundles similar to the embedded code.

-- 
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