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] Commented: (DERBY-847) Internationalize NetIndoubtTransaction to NetSqlca in org.apache.derby.client.net
Date Tue, 23 May 2006 17:55:30 GMT
    [ http://issues.apache.org/jira/browse/DERBY-847?page=comments#action_12412971 ] 

David Van Couvering commented on DERBY-847:

Thanks, Dag, some responses below

* I don't understand the reference to Messages.java; I can't seem to
  find that file in the diff.
Sorry, I meant MessageUtil.java

* SQLException.java:
  new public method getMessageUtil() lacks java doc. Anyway, good to get rid of those
  unneccary objects!
OK, I will add javadoc

* Utils.java:
   changed line > 80 long:
OK, will fix

* The way the SQLState constructors are invoked, say, in
  NetPackageRequest.java is hard to verify since constructors don't have
  javadoc describing how they should be used. In this case an Integer
  object is being passed to a constructor that takes an Object in that
  position. I would love to see some javadoc as to what objects are
Hm, this is pretty standard, it's the way StandardException in the engine works too.  Basically,
*any* Java object is acceptable.  The Java messge formatting code substitutes these objects
into the localized message (marked with substitution parameters like {0} and {1}) and invokes
the toString() method on them.  I can javadoc this though -- but ony for the "main" constructor
-- all the other constructors are syntactic sugar that simply delegate to the main constructor.

* NetResultReply.java:
- changed line > 80 characters:
OK, I'll fix this.

* SQLState.java :
  I don't understand why the new SQLState DRDA_CURSOR_NOT_OPEN is not
  assigned in the 58 range since it is declared under the header:
  "Messages whose SQL states are proscribed by DRDA" and that seem to
  be what the range 58 is for; cf. this header in

  # 57,58 - DRDA errors with SQLStates required by the spec

  and the most other states declared under the same header do have
  58... range states. It is listed in messages_en.properties along
  with the 2D... range in stead, although with the allocated state

  Disclaimer: I am afraid I don't understand fully how the allocations
  are done yet.
Yes, this is all kind of abstruse, and I'm not sure how much I'm supposed to document in the
code.  DRDA defines very specific SQL States, some starting with 58 and others not, for specific
conditions.   DRDA requires that the "cursor not open" condition be set to 24501, whereas
the "no autocommit under XA" must be set to 2D521.  Don't ask me why, I don't know why.  It's
in the spec.  So, anyway, I grouped all SQL States required by the DRDA spec into a single
area in SQLState.java.

Is there more I should say in the comments to clarify this?



> Internationalize NetIndoubtTransaction to NetSqlca in org.apache.derby.client.net
> ---------------------------------------------------------------------------------
>          Key: DERBY-847
>          URL: http://issues.apache.org/jira/browse/DERBY-847
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering
>  Attachments: DERBY-847-1.diff

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