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

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

Thanks, Dag, some responses below

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

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

<DAG>
* Utils.java:
   changed line > 80 long:
   
SqlException.getMessageUtil().getTextMessage(MessageId.CONN_PRECISION_TOO_LARGE));
</DAG>
OK, will fix

<DAG>
* 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
  allowed.
</DAG>
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.  

<DAG>
* NetResultReply.java:
- changed line > 80 characters:
  
SqlException.getMessageUtil().getTextMessage(MessageId.CONN_CURSOR_NOT_OPEN)));
</DAG>
OK, I'll fix this.

<DAG>
* 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
  messages_en.properties:

  # 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
  24501.

  Disclaimer: I am afraid I don't understand fully how the allocations
  are done yet.
</DAG>
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?

Thanks,

David



> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to